@Test
public void test_listAppRoles_failure() {

    String token = "5PDrOhsy4ig8L3EpsJZSLAMg";
    String responseJson = "{\r\n" + 
    		"  \"error\": \r\n" + 
    		"    \"\"\r\n" + 
    		"  \r\n" + 
    		"}";
    ResponseEntity<String> responseEntityExpected = ResponseEntity.status(HttpStatus.BAD_REQUEST).body(responseJson);
    UserDetails userDetails = getMockUser("testuser1", false);
    Response response =getMockResponse(HttpStatus.BAD_REQUEST, true, responseJson);
    String _path = "metadata/approle_users/" + userDetails.getUsername();
    String jsonStr = "{\"path\":\""+_path+"\"}";
    when(reqProcessor.process("/auth/approles/rolesbyuser/list", jsonStr,userDetails.getSelfSupportToken())).thenReturn(response);
    when(ControllerUtil.hideMasterAppRoleFromResponse(Mockito.any())).thenReturn(response);
    ResponseEntity<String> responseEntityActual = appRoleService.listAppRoles(token, userDetails);
    assertEquals(HttpStatus.BAD_REQUEST, responseEntityActual.getStatusCode());
    assertEquals(responseEntityExpected, responseEntityActual);
}