@Test
public void test_readAppRoleRoleId_WithUserDetails_failure() throws Exception {

    String token = "5PDrOhsy4ig8L3EpsJZSLAMg";
    UserDetails userDetails = getMockUser("testuser1", false);
    String role_name = "selfservicesupportrole";
    String responseJson = "{\"errors\":[\"Access denied: You don't have enough permission to read the role_id associated with the AppRole\"]}";
    Response response =getMockResponse(HttpStatus.BAD_REQUEST, true, responseJson);
    when(reqProcessor.process("/auth/approle/role/readRoleID","{\"role_name\":\""+role_name+"\"}",userDetails.getSelfSupportToken())).thenReturn(response);
    ResponseEntity<String> responseEntityExpected = ResponseEntity.status(HttpStatus.BAD_REQUEST).body(response.getResponse());
    ResponseEntity<String> responseEntityActual = appRoleService.readAppRoleRoleId(token, role_name, userDetails);
    assertEquals(HttpStatus.BAD_REQUEST, responseEntityActual.getStatusCode());
    assertEquals(responseEntityExpected, responseEntityActual);
}