@Test
public void test_readAppRoleMetadata_failure() throws Exception{

    String token = "5PDrOhsy4ig8L3EpsJZSLAMg";
    String role_name = "testapprole01";
    String username = "testuser1";
    AppRoleMetadata approleMetadataExpected = new AppRoleMetadata();
    String _path = "metadata/approle/" + role_name;
    approleMetadataExpected.setPath(_path);
    AppRoleMetadataDetails appRoleMetadataDetails = new AppRoleMetadataDetails();
    appRoleMetadataDetails.setCreatedBy(username);
    appRoleMetadataDetails.setName(role_name);
    approleMetadataExpected.setAppRoleMetadataDetails(appRoleMetadataDetails);
    
    String responseJson = new ObjectMapper().writeValueAsString(approleMetadataExpected);
    Response response = getMockResponse(HttpStatus.NOT_FOUND, true, responseJson);
    
    when(ControllerUtil.parseJson(responseJson)).thenReturn(null);
    
    when(reqProcessor.process("/read", "{\"path\":\""+_path+"\"}",token)).thenReturn(response);
    AppRoleMetadata appRoleMetadataExpected = appRoleService.readAppRoleMetadata(token, role_name);
    assertEquals(null, appRoleMetadataExpected);
}