HostJdbcDao extends JdbcDaoSupport { public void setAdministrationStatus(HostAdministrationStatus hostAdministrationStatus, long hostId) { Object[] args = {ObjectUtils.toString(hostAdministrationStatus), hostId}; getJdbcTemplate().update(sqlSetAdministrationStatus, args); }  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 setAdministrationStatusTest() { Object[] args = { "Up", 0l }; Mockito.doReturn(0).when(jdbcTemplate).update(sqlSetAdministrationStatus, args); spy.setAdministrationStatus(HostAdministrationStatus.Up, 0l); Mockito.verify(jdbcTemplate).update(sqlSetAdministrationStatus, args); }