Skip to main content
grasp.study
About
Explore
Pricing
Log in
Try it for free
Back to course
👋
Welcome to a Grasp lesson
Create a free account
to keep studying and create your own study path.
Spring framework fundamentals
·
Module 9
Testing Spring Applications
1
Unit Testing with JUnit 5 and Mockito
Write a basic unit test for a Java class using JUnit 5 and Mockito.
2
Unit Testing @Service Layers with Mocked Repositories
Write a unit test for a @Service class by mocking its repository dependencies.
3
Testing the Data Layer with @DataJpaTest
Write an integration test for the data layer using @DataJpaTest and an in-memory database.
4
Testing REST Controllers with MockMvc and @SpringBootTest
Write an integration test for a REST controller using @SpringBootTest and MockMvc.
5
Mocking Beans with @MockBean in Spring Tests
Use @MockBean to replace a bean with a mock in a Spring integration test.
Previous module
API Error Handling and Logging
Next module
Securing APIs with Spring Security