Create a fully-configured instance of the Spring ApplicationContext for testing.
Can be used to test the application’s components
Auto inject the mock and spy bean into class
Configures our entities, repositories and also sets up an embedded database
The method of the mock class will not be implemented
For simulating the edge cases and make sure that the interaction happened
Partially mocking the class
Part of the function can be implementation, e.g: The add children of array
Last updated 2 years ago