ClusterJdbcDao extends JdbcDaoSupport { public void setClusterLastAdministration(Date date, long clusterId) { Object[] args = { date, clusterId }; getJdbcTemplate().update(sqlSetClusterLastAdministration, args); }  ClusterAdministrationStatus getClusterAdministrationStatus(long clusterId); void setClusterAdministrationStatus(ClusterAdministrationStatus clusterConsolidationStatus, long clusterId); Date getClusterLastAdminstration(long clusterId); void setClusterLastAdministration(Date date, long clusterId);  }
@Test public void setClusterLastAdministrationTest() { Date date = new Date(); Object[] args = { date, 0l }; Mockito.doReturn(0).when(jdbcTemplate).update(sqlSetClusterLastAdministration, args); spy.setClusterLastAdministration(date, 0l); Mockito.verify(jdbcTemplate).update(sqlSetClusterLastAdministration, args); }