Calendar timeOfQuery = TimeHelper.getTimeAgo(1 * 60 * 1000);
// a more recent time, for testing to see if a query is updated after it is created
Calendar timeOfUpdate = TimeHelper.getTimeAgo(1 * 30 * 1000);
jdbc.update("insert into blur_queries (state, updated_at, created_at) values (?,?,?)", 1, timeOfQuery, timeOfQuery);
Thread testQueryCleaner = new Thread(new QueriesCleaner(database), "Query Test Thread");
testQueryCleaner.start();
try {
testQueryCleaner.join();
} catch (InterruptedException e) {
fail("The test QueriesCleaner failed while waiting for it to finish!");