HostService { public boolean isHostInPreparedForMaintenance(long hostId) { return ResourceState.PrepareForMaintenance.equals(hostDaoJdbc.getResourceState(hostId)); }  boolean isHostUpAndEnabled(long hostId); boolean isHostInMaintenanceError(long hostId); boolean isHostInPreparedForMaintenance(long hostId); @Transactional(readOnly = false) void markHostAsShutdownByAdministrationAgent(long id); void loadHostDetails(HostVO host); List<HypervisorType> getAllHypervisorsTypeInCloud(); HostVO findHostById(Long hostId); List<HostVO> listAllHostsInCluster(Cluster cluster); List<VMInstanceVO> listAllVmsFromHost(long hostId); @Transactional(readOnly = false) void updateHostPrivaceMacAddress(HostVO hostVo, String privateMacAddress); boolean isHostDown(long id); boolean isThereAnyHostOnCloudDeactivatedByOurManager();  }
@Test public void isHostInPreparedForMaintenanceTest() throws Exception { executeResourceStateCheck(true, ResourceState.PrepareForMaintenance, "isHostInPreparedForMaintenance"); }