O'Reilly logo

Pivotal Certified Professional Spring Developer Exam: A Study Guide by Iuliana Cosmina

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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); ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required