TokenCleanupTask extends TimerTask implements RepeatingTask { @Override public TimerTask getTask() { return this; } @Inject  TokenCleanupTask(final SessionFactory sessionFactory,
                            final DatabaseMigrationState dbState); @Override TimerTask getTask(); @Override long getPeriod(); @Override void run();  }
@Test public void testGetTask() { TokenCleanupTask task = new TokenCleanupTask(getSessionFactory(), null); TimerTask rTask = task.getTask(); assertSame(task, rTask); }