HostJdbcDao extends JdbcDaoSupport { public boolean isThereAnyHostOnPodDeactivatedByOurManager(long id) { List<Long> hostsIds = getJdbcTemplate().queryForList(sqlCheckIsThereAnyHostOnPodDeactivatedByOurManager, Long.class, id); return CollectionUtils.isNotEmpty(hostsIds); }  HostAdministrationStatus getAdministrationStatus(long hostId); void setAdministrationStatus(HostAdministrationStatus hostAdministrationStatus, long hostId); StartType getStartType(long hostId); Status getStatus(long hostId); ResourceState getResourceState(long hostId); List<HypervisorType> getAllHypervisorsTypeInCloud(); boolean isThereAnyHostOnCloudDeactivatedByOurManager(); boolean isThereAnyHostOnPodDeactivatedByOurManager(long id);  }
@Test public void isThereAnyHostOnPodDeactivatedByOurManagerTest() { List<Long> hostsIds = new ArrayList<>(); hostsIds.add(0l); configureIsThereAnyHostOnPodDeactivatedByOurManager(hostsIds); boolean result = spy.isThereAnyHostOnPodDeactivatedByOurManager(0l); verifyIsThereAnyHostOnPodDeactivatedByOurManager(true, result); }
@Test public void isThereAnyHostOnPodDeactivatedByOurManagerTestEmptyList() { configureIsThereAnyHostOnClusterDeactivatedByOurManager(new ArrayList<Long>()); boolean result = spy.isThereAnyHostOnPodDeactivatedByOurManager(0l); verifyIsThereAnyHostOnPodDeactivatedByOurManager(false, result); }