ifs-web-service/ifs-application-commons/src/test/java/org/innovateuk/ifs/async/controller/endtoend/EndToEndAsyncControllerIntegrationTest.java
/**
     * Swap out the real RestTemplate temporarily for a mock one so that we can mock out communication with the data
     * layer
     */
Swap out the real RestTemplate temporarily for a mock one so that we can mock out communication with the data
layer
Swap out the real RestTemplate temporarily for a mock one so that we can mock out communication with the data layer
@Before
    public void swapOutRestTemplateForMock() {
        DefaultRestTemplateAdaptor restTemplateAdaptor = getRestTemplateAdaptorFromApplicationContext();
        restTemplateMock = mock(RestTemplate.class);
        ReflectionTestUtils.setField(restTemplateAdaptor, "restTemplate", restTemplateMock);
    }
@ Before public void swapOutRestTemplateForMock ( ) { DefaultRestTemplateAdaptor restTemplateAdaptor = getRestTemplateAdaptorFromApplicationContext ( ) ; restTemplateMock = mock ( RestTemplate . class ) ; ReflectionTestUtils . setField ( restTemplateAdaptor , "restTemplate" , restTemplateMock ) ; }
Swap out the real RestTemplate temporarily for a mock one so that we can mock out communication with the data
 layer
Swap out the real RestTemplate temporarily for a mock one so that we can mock out communication with the data layer