import static org.junit.Assert.*;import static org.springframework.test.web.client.match.      MockRestRequestMatchers.method;import static org.springframework.test.web.client.match.      MockRestRequestMatchers.requestTo;import static org.springframework.test.web.client.ExpectedCount.once;import static org.springframework.test.web.client.response.      MockRestResponseCreators.withSuccess;...@RunWith(SpringJUnit4ClassRunner.class)@ContextConfiguration(classes  =  {WebConfig.class,      StandaloneRestUserControllerTest.TestConfig.class})@WebAppConfigurationpublic class StandaloneRestUserControllerTest {
    @Configuration    static class TestConfig {        @Bean        UserService userService() {            return Mockito.mock(UserService.class); ...

Get Pivotal Certified Professional Spring Developer Exam: A Study Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.