HostJdbcDao extends JdbcDaoSupport { public StartType getStartType(long hostId) { return StartType.valueOf(getJdbcTemplate().queryForObject(sqlGetStartType, String.class, hostId)); }  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 getStartTypeTest() { Mockito.doReturn("WakeOnLan").when(jdbcTemplate).queryForObject(Mockito.eq(sqlGetStartType), Mockito.eq(String.class), Mockito.eq(0l)); StartType result = spy.getStartType(0l); Mockito.verify(jdbcTemplate).queryForObject(Mockito.eq(sqlGetStartType), Mockito.eq(String.class), Mockito.eq(0l)); Assert.assertEquals(StartType.WakeOnLan, result); }