Spring Framework TEST RESTful Web Service (Controller) Offline i.e. No Server, No Database

Here is one suggestion that should give you some ideas. I assume that you are familiar with the SpringJUnit4ClassRunner and the @ContextConfiguration. Start by creating an test application context that contains PcUserController and a mocked PcUserService. In the example PcUserControllerTest class below, Jackson is used to convert JSON messages and Mockito is used for mocking. … Read more