I think the call of webAppContextSetup
method now should be explicitly parameterized with the class of <B extends DefaultMockMvcBuilder<B>>
. The obvious candidates are StandaloneMockMvcBuilder
or simply DefaultMockMvcBuilder
(though the later will generate a warning about unchecked or unsafe operations). So try this:
mockMvc = MockMvcBuilders.<StandaloneMockMvcBuilder>webAppContextSetup(wac).build();