Mockito.when(configService.updateConfiguration(updateCfgCmd)).thenReturn(cfg);
} catch (Exception e) {
Assert.fail("Received exception when success expected " + e.getMessage());
}
ConfigurationResponse response = new ConfigurationResponse();
response.setName("Test case");
Mockito.when(responseGenerator.createConfigurationResponse(cfg)).thenReturn(response);
updateCfgCmd.execute();
Mockito.verify(responseGenerator).createConfigurationResponse(cfg);
ConfigurationResponse actualResponse = (ConfigurationResponse)updateCfgCmd.getResponseObject();
Assert.assertEquals(response, actualResponse);
Assert.assertEquals("updateconfigurationresponse", response.getResponseName());
}