results.add(host);
Mockito.when(hostDao.listAll()).thenReturn(results);
Mockito.when(hostDao.findById(Matchers.anyLong())).thenReturn(host);
Mockito.when(hostDao.findHypervisorHostInCluster(Matchers.anyLong())).thenReturn(results);
List<EndPoint> eps = new ArrayList<EndPoint>();
<BUG>eps.add(RemoteHostEndPoint.getHypervisorHostEndPoint(host.getId(), host.getPrivateIpAddress(), host.getPublicIpAddress()));
Mockito.when(selector.selectAll(Matchers.any(DataStore.class))).thenReturn(eps);</BUG>
Mockito.when(selector.select(Matchers.any(DataObject.class))).thenReturn(eps.get(0));
Mockito.when(selector.select(Matchers.any(DataObject.class), Matchers.any(DataObject.class))).thenReturn(eps.get(0));
}

results.add(host);
Mockito.when(hostDao.listAll()).thenReturn(results);
Mockito.when(hostDao.findById(Matchers.anyLong())).thenReturn(host);
Mockito.when(hostDao.findHypervisorHostInCluster(Matchers.anyLong())).thenReturn(results);
List<EndPoint> eps = new ArrayList<EndPoint>();
eps.add(RemoteHostEndPoint.getHypervisorHostEndPoint(host));
Mockito.when(selector.selectAll(Matchers.any(DataStore.class))).thenReturn(eps);
Mockito.when(selector.select(Matchers.any(DataObject.class))).thenReturn(eps.get(0));
Mockito.when(selector.select(Matchers.any(DataObject.class), Matchers.any(DataObject.class))).thenReturn(eps.get(0));
}
