in component-test/src/main/java/IdentityApiDocumentation.java [107:130]
public void documentDeleteRole ( ) throws InterruptedException {
try (final AutoUserContext ignore = loginAdmin()) {
final String roleIdentifier = generateRoleIdentifier();
final Permission rolePermission = buildRolePermission();
final Role scribe = buildRole(roleIdentifier, rolePermission);
getTestSubject().createRole(scribe);
super.eventRecorder.wait(EventConstants.OPERATION_POST_ROLE, scribe.getIdentifier());
try {
this.mockMvc.perform(delete("/roles/" + scribe.getIdentifier())
.accept(MediaType.ALL_VALUE)
.contentType(MediaType.APPLICATION_JSON_VALUE))
.andExpect(status().isAccepted())
.andDo(document("document-delete-role", preprocessRequest(prettyPrint())));
} catch (Exception e) {
e.printStackTrace();
}
} catch (InterruptedException e) {
e.printStackTrace();
}
}