@Test
public void test_updateGroupPolicies_failed() throws Exception {

    String token = "4EpPYDSfgN2D4Gf7UmNO3nuL";
    String id = "12wdsadsad";
    Response deleteByIdResponse = getMockResponse(HttpStatus.BAD_REQUEST, true, "");
    when(reqProcessor.process("/identity/group-alias/id/delete", "{\"id\":\"" + id + "\"}", token)).thenReturn(deleteByIdResponse);
    String name = "r_vault_demo";
    List<String> policies = new ArrayList<>();
    policies.add("testpolicy1");
    policies.add("safeadmin");
    List<String> currentPolicies = new ArrayList<>();
    currentPolicies.add("testpolicy2");
    String responseJson = "{\"data\":{\"id\": \"canonicalID\"}}";
    OIDCIdentityGroupRequest oidcIdentityGroupRequest = new OIDCIdentityGroupRequest();
    oidcIdentityGroupRequest.setName("name");
    oidcIdentityGroupRequest.setPolicies(policies);
    Response rsResponse = getMockResponse(HttpStatus.OK, true, responseJson);
    when(reqProcessor.process("/identity/group/name/update", JSONUtil.getJSON(oidcIdentityGroupRequest), token)).thenReturn(rsResponse);
    Response expectedResponse = getMockResponse(HttpStatus.BAD_REQUEST, true, "");
    Response updateResponse = oidcUtil.updateGroupPolicies(token, name, policies, currentPolicies,  id);
    assertEquals(expectedResponse.getHttpstatus(), updateResponse.getHttpstatus());
}