@Test
public void testDelete() throws SQLException {

    try(Connection connection = dataSource.getConnection();
        Statement st = connection.createStatement()) {
        st.execute("DROP TABLE IF EXISTS \"MY TABLE\"");
        st.execute("CREATE TABLE \"MY TABLE\"(PK INTEGER PRIMARY KEY) AS SELECT X FROM SYSTEM_RANGE(1,50);");
        // Drop some rows
        LongUnion pkToDelete = new LongUnion(1, 25);
        DeleteSelectedRows deleteSelectedRows = new DeleteSelectedRows(pkToDelete, "MY TABLE", dataSource);
        deleteSelectedRows.doInBackground();
        // Check if rows are deleted
        try(ResultSet rs = st.executeQuery("SELECT PK FROM \"MY TABLE\"")) {
            for(long expectedPk : new LongUnion(26,50)) {
                assertTrue(rs.next());
                assertEquals(expectedPk, rs.getLong(1));
            }
            assertFalse(rs.next());
        }
    }
}