@Test
public void updateOIDCEntity() throws Exception {

    String token = "4EpPYDSfgN2D4Gf7UmNO3nuL";
    String name = "name";
    List<String> policies = new ArrayList<>();
    policies.add("safeadmin");
    String entityName = "entityName";
    OIDCEntityRequest oidcEntityRequest = new OIDCEntityRequest();
    oidcEntityRequest.setDisabled(false);
    Map<String, String> metadata = new HashMap<String, String>();
    metadata.put("organization", "t-vault");
    oidcEntityRequest.setMetadata(metadata);
    oidcEntityRequest.setPolicies(null);
    oidcEntityRequest.setName(name);
    String jsonStr = JSONUtil.getJSON(oidcEntityRequest);
    Response response = getMockResponse(HttpStatus.OK, true, "{\"data\": [\"safeadmin\",\"vaultadmin\"]]");
      ResponseEntity<String> responseEntityExpected = ResponseEntity.status(HttpStatus.OK)
              .body("{\"data\": [\"safeadmin\",\"vaultadmin\"]]");
    when(tokenUtils.getSelfServiceTokenWithAppRole()).thenReturn(token);
    when(reqProcessor.process("/identity/entity/name/update", jsonStr, token)).thenReturn(response);
     
    Response responseEntity = oidcUtil.updateOIDCEntity(policies, entityName);
    assertEquals(HttpStatus.OK, responseEntity.getHttpstatus());
}