This question is next to the question I had asked here. In this question I want to focus on ways of testing a Spring based REST Controller.
Currently, the way I have set-up my testing is - Use spring-test-mvc framework with database that basically does end-to-end testing.
I want to get rid of a database layer. Why? Do I really need a database layer? Can't I mock a database?
So, I would like to know of an efficient way of testing a Spring based REST Controller which incorporates framework like Mockito, etc.
Please share and guide me in the right direction.