HostService { @Transactional(readOnly = false) public void markHostAsShutdownByAdministrationAgent(long id) { hostDaoJdbc.setAdministrationStatus(HostAdministrationStatus.ShutDownToConsolidate, id); }  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 markHostAsShutdownByAdministrationAgentTest() { Mockito.doNothing().when(hostDaoJdbc).setAdministrationStatus(Mockito.eq(HostAdministrationStatus.ShutDownToConsolidate), Mockito.anyLong()); spy.markHostAsShutdownByAdministrationAgent(0l); Mockito.verify(hostDaoJdbc).setAdministrationStatus(Mockito.eq(HostAdministrationStatus.ShutDownToConsolidate), Mockito.anyLong()); }