I am trying to generate a Rest API documentation based on spring-restdocs
In following code I am getting a compile time error at apply()
The method apply(RestDocumentationMockMvcConfigurer) is undefined for the type DefaultMockMvcBuilder
@ContextConfiguration(locations = { "classpath:/testApplicationRestService.xml" })
@RunWith(SpringJUnit4ClassRunner.class)
@WebAppConfiguration
public class CustomerControllerTest {
@Rule
public final RestDocumentation restDocumentation = new RestDocumentation(
"build/generated-snippets");
@Autowired
private WebApplicationContext context;
private MockMvc mockMvc;
@Before
public void setUp() {
this.mockMvc = MockMvcBuilders.webAppContextSetup(this.context)
.apply(documentationConfiguration(this.restDocumentation))
.build();
}
}