Collection of examples for testing within spring-boot using Junit and Mockito test frameworks.
Spring-Boot testing documentation
Mockito - mocking and spying framework
To run tests we use the build tool Maven.
To run all tests:
mvn test
To run a specific test class e.g: classToTest.java use the command:
mvn -Dtest=classToTest test
To run a specific test method within a class:
mvn -Dtest=classToTest#testMethodToRun test