HostResponse hostResponse1 = createNiceMock(HostResponse.class);
RootServiceHostComponentResponse response = createNiceMock(RootServiceHostComponentResponse.class);
AbstractRootServiceResponseFactory factory = createNiceMock(AbstractRootServiceResponseFactory.class);
List<Host> hosts = new LinkedList<Host>();
hosts.add(host1);
Set<Cluster> clusterSet = new HashSet<Cluster>();
clusterSet.add(cluster);
Set<RootServiceHostComponentResponse> responseSet = new HashSet<RootServiceHostComponentResponse>();
responseSet.add(response);
// set expectations
expect(managementController.getRootServiceResponseFactory()).andReturn(factory).anyTimes();
expect(managementController.getClusters()).andReturn(clusters).anyTimes();
expect(clusters.getHosts()).andReturn(hosts).anyTimes();
expect(factory.getRootServiceHostComponent((RootServiceHostComponentRequest) anyObject(), (Set<HostResponse>) anyObject())).
andReturn(responseSet).anyTimes();
expect(clusters.getCluster("Cluster100")).andReturn(cluster).anyTimes();
expect(clusters.getClustersForHost("Host100")).andReturn(clusterSet).anyTimes();