String host = "host";
int port = 1234;
URI masterUri = URI.create("https://" + host + ":" + port);
when(clusterConfig.getClusterMasterUri()).thenReturn(masterUri);
ClusterPeers clusterPeers = mock(ClusterPeers.class);
when(peersProvider.getClusterPeers(masterUri)).thenReturn(clusterPeers);
ClusterPeer clusterPeer = mock(ClusterPeer.class);
when(clusterPeers.get(guid)).thenReturn(clusterPeer);
when(clusterPeer.getHost()).thenReturn(host);
when(clusterPeer.getPort()).thenReturn(port);
IndexerInfo indexer = clusterMaster.indexerForGuid(guid);
assertEquals(indexer, new IndexerInfo(host, port));