@Test
public void test_updateMetadataOnSvcUpdate_successfully() {

    String token = "7QPMPIGiyDFlJkrK3jFykUqa";
    Map<String,String> params = new HashMap<String,String>();
    params.put("type", "initialPasswordReset");
    params.put("path",new StringBuffer(TVaultConstants.SVC_ACC_ROLES_PATH).append("testacc02").toString());
    params.put("value","true");
    String path = TVaultConstants.SVC_ACC_ROLES_PATH + "testacc02";
    ServiceAccount serviceAccount = new ServiceAccount();
    serviceAccount.setName("svc_vault_test2");
    serviceAccount.setAutoRotate(true);
    serviceAccount.setTtl(1234L);
    serviceAccount.setMax_ttl(12345L);
    serviceAccount.setOwner("svcuser1");
    serviceAccount.setAppName("app1");
    Response metaResponse = getMockResponse(HttpStatus.OK, true, "{\"data\":{ \"initialPasswordReset\": false,\"managedBy\": \"svcuser2\",\"name\": \"svc_vault_test2\",\"users\": {\"svcuser1\": \"sudo\"}}}");
    when(reqProcessor.process(eq("/read"),Mockito.any(),eq(token))).thenReturn(metaResponse);
    when(reqProcessor.process(eq("/write"),Mockito.any(),eq(token))).thenReturn(getMockResponse(HttpStatus.NO_CONTENT, true, ""));
    Response actualResponse = ControllerUtil.updateMetadataOnSvcUpdate(path, serviceAccount, token);
    assertEquals(HttpStatus.NO_CONTENT, actualResponse.getHttpstatus());
}