MockMvc
is one of the classes in spring-test
. This is primarily used for unit testing of the controller layer. Not just your controller class. This is for tetsing the controller layer. But you have to mock service and other layers. Hence it is primarily used for unit testing.
TestRestTemplate
is again part of spring test, as the documentation says,
Convenient alternative of {@link RestTemplate} that is suitable for
integration tests.
This can be used to test your Rest Service/ endpoints. One of the main difference is you use MockMvc for unit testing and TestRestTemplate for Integration testing. In other words, for using MockMvc, you don't need a running instance of server, but for TestRestTemplate you would need.
RestAssured
is a completely different framework. This has nothing to do with Spring. This is a librariy, which provides various ways to test any REST service with fluent BDD style interface.