@Test(groups = INTEGRATION)
public void testDoesNotReturnEventsThatWereCreatedBeforeTheListenerLastCheck()
        throws SQLException, InterruptedException {

    //event was there
    insertEvent(new MysqlEvent(1, TEST_TABLE_NAME, INSERT_TYPE, "{}", "{}", new Date()), connection);
    //listener was created later
    Thread.sleep(1000L);
    ListenerRepo listenerRepo = new ListenerRepo();
    listener = listenerRepo.insert(new Listener(TEST_TABLE_NAME), connection);
    //fetching events shouldnt return anything
    List<MysqlEvent> newEventsForListener = repo.getNewEventsForListener(listener, connection);
    assertTrue(newEventsForListener.isEmpty());
}