@Test(groups = SMALL)
public void testConnectRegistersAListenerInPsqlForGivenStreamName() throws SQLException {

    Statement mockedStmt = mock(Statement.class);
    when(mockedConnection.createStatement()).thenReturn(mockedStmt);
    eventSource.connect();
    verify(mockedStmt).execute("LISTEN " + STREAM_NAME);
}