title: Mocking a service in Spring 5.0.7.RELEASE
body: <p>I have a Spring 5.0.7.RELEASE app, with some WebLayer tests I have this test in my app:</p>
  <pre><code>@RunWith(SpringRunner.class)
  @WebAppConfiguration
  public class HongoControllerTest  {
  
      @Mock
      FactureService factureService;
  
      @Autowired
      private WebApplicationContext wac;
  
      private MockMvc mockMvc;
  
      ObjectMapper obj = new ObjectMapper();
  
  
      @Before
      public void setup() {
  
          MockitoAnnotations.initMocks(this);
          this.mockMvc = MockMvcBuilders.webAppContextSetup(this.wac)
                  .build();
  
          when(factureService.setLockFilter(any())).thenReturn(Boolean.TRUE);
      }
  }
  </code></pre>
  <p>but when I run the test, the FactureService is not mocked</p>