@Test
public void testGetClientHostForRunningAction_componentMapIsEmpty() throws Exception {

  Injector injector = createNiceMock(Injector.class);
  Cluster cluster = createNiceMock(Cluster.class);
  Service service = createNiceMock(Service.class);
  ServiceComponent component = createNiceMock(ServiceComponent.class);
  Map<String, ServiceComponentHost> hostMap = new HashMap<String, ServiceComponentHost>();
  expect(component.getServiceComponentHosts()).andReturn(hostMap);
  replay(cluster, service, component, injector);
  AmbariManagementControllerImpl controller = new AmbariManagementControllerImpl(null, clusters, injector);
  String host = controller.getClientHostForRunningAction(cluster, service, component);
  verify(cluster, service, component, injector);
  assertNull(host);
}