@Test
public void test_configureLdapGroup_successfully_metaUpdate_failure() {

    String token = "4EpPYDSfgN2D4Gf7UmNO3nuL";
    String jsonStr = "{\"groupname\":\"admin\",\"policies\": \"admin,default\"}";
    Response responseNotFound = getMockResponse(HttpStatus.NOT_FOUND, false, "");
    Response responseNoContent = getMockResponse(HttpStatus.NO_CONTENT, true, "");
    Response response = getMockResponse(HttpStatus.MULTI_STATUS, true, "Meta data update failed");
    ResponseEntity<String> responseEntityExpected = ResponseEntity.status(HttpStatus.MULTI_STATUS).body("{\"messages\":[\"LDAP group configured\",\"Meta data update failed\"]}");
    LDAPGroup ldapGroup = new LDAPGroup("admin", "admin,default");
    when(JSONUtil.getJSON(ldapGroup)).thenReturn(jsonStr);
    when(ControllerUtil.updateMetaDataOnConfigChanges(Mockito.any(), Mockito.any(), Mockito.any(), Mockito.any(), Mockito.any())).thenReturn(response);
    when(reqProcessor.process("/auth/ldap/groups","{\"groupname\":\"admin\"}",token)).thenReturn(responseNotFound);
    when(reqProcessor.process("/auth/ldap/groups/configure",jsonStr,token)).thenReturn(responseNoContent);
    ResponseEntity<String> responseEntity = ldapAuthService.configureLdapGroup(token, ldapGroup);
    assertEquals(HttpStatus.MULTI_STATUS, responseEntity.getStatusCode());
    assertEquals(responseEntityExpected, responseEntity);
}