Assert.assertTrue(date.after(new Date()));
}
@Test
public void blockLogsInvocationTimeInAnInfiniteFuture() {
Calltype TOP = Calltype.ARTIST_GET_TOP_TRACKS;
Artist artist = new Artist("Björn Olsson");
int artistId = musicDao.getArtistId(artist);
WebserviceInvocation wi = new WebserviceInvocation(TOP, artist);
assertTrue(dao.isWebserviceInvocationAllowed(wi));
dao.blockWebserviceInvocation(artistId, TOP);
assertFalse(dao.isWebserviceInvocationAllowed(wi));
dao.getJdbcTemplate().queryForObject(
"select 1 from library.webservice_history"
+ " where artist_id = ? and calltype_id = ? and invocation_time = 'infinity'",
Integer.class, artistId, TOP.getDatabaseId());
}