verify(managementController, response);
}
@Test
public void testUpdateWithConfiguration() throws Exception {
AmbariManagementController managementController = createMock(AmbariManagementController.class);
RequestStatusResponse response = createNiceMock(RequestStatusResponse.class);
Set<ClusterResponse> nameResponse = new HashSet<ClusterResponse>();
nameResponse.add(new ClusterResponse(100L, "Cluster100", null, null));
Map<String, String> mapRequestProps = new HashMap<String, String>();
mapRequestProps.put("context", "Called from a test");
// set expectations
expect(managementController.getClusters(EasyMock.<Set<ClusterRequest>>anyObject())).andReturn(nameResponse).once();
expect(managementController.updateCluster(EasyMock.anyObject(ClusterRequest.class),
eq(mapRequestProps))).andReturn(response).once();
// replay
replay(managementController, response);