### Question:
PhasingPollTable extends EntityDbTable<PhasingPoll> { public DbIterator<Transaction> getAccountPhasedTransactions(long accountId, int from, int to, int height) throws SQLException { Connection con = null; try { con = getDatabaseManager().getDataSource().getConnection(); PreparedStatement pstmt = con.prepareStatement("SELECT transaction.* FROM transaction, phasing_poll " + " LEFT JOIN phasing_poll_result ON phasing_poll.id = phasing_poll_result.id " + " WHERE phasing_poll.id = transaction.id AND (transaction.sender_id = ? OR transaction.recipient_id = ?) " + " AND phasing_poll_result.id IS NULL " + " AND phasing_poll.finish_height > ? ORDER BY transaction.height DESC, transaction.transaction_index DESC " + DbUtils.limitsClause(from, to)); int i = 0; pstmt.setLong(++i, accountId); pstmt.setLong(++i, accountId); pstmt.setInt(++i, height); DbUtils.setLimits(++i, pstmt, from, to); return blockchain.getTransactions(con, pstmt); } catch (SQLException e) { DbUtils.close(con); throw e; } } @Inject  PhasingPollTable(Blockchain blockchain); @Override PhasingPoll load(Connection con, ResultSet rs, DbKey dbKey); PhasingPoll get(long id); @Override void save(Connection con, PhasingPoll poll); List<Transaction> getFinishingTransactions(int height); List<Transaction> getFinishingTransactionsByTime(int startTime, int finishTime); long getSenderPhasedTransactionFees(long accountId, int height); DbIterator<Transaction> getHoldingPhasedTransactions(long holdingId, VoteWeighting.VotingModel votingModel,
                                                                long accountId, boolean withoutWhitelist, int from, int to, int height); DbIterator<Transaction> getAccountPhasedTransactions(long accountId, int from, int to, int height); int getAccountPhasedTransactionCount(long accountId, int height); int getAllPhasedTransactionsCount(); List<TransactionDbInfo> getActivePhasedTransactionDbIds(int height); boolean isTransactionPhased(long id); @Override void trim(int height);  }### Answer:
@Test void testGetAccountPhasedTransactionsWithPaginationSkipFirstAtLastBlockHeight() throws SQLException { List<Transaction> transactions = CollectionUtil.toList(table.getAccountPhasedTransactions(ptd.POLL_0.getAccountId(), 1, 2, ptd.POLL_5.getHeight() - 1)); assertTrue(transactions.isEmpty()); }
@Test void testGetAccountPhasedTransactionsWithPaginationSkipFirstAtGenesisBlockHeight() throws SQLException { List<Transaction> transactions = CollectionUtil.toList(table.getAccountPhasedTransactions(ptd.POLL_0.getAccountId(), 1, 2, 0)); assertEquals(List.of(ttd.TRANSACTION_12, ttd.TRANSACTION_11), transactions); }
@Test void testGetAllAccountPhasedTransactionsWithPagination() throws SQLException { List<Transaction> transactions = CollectionUtil.toList(table.getAccountPhasedTransactions(ptd.POLL_0.getAccountId(), 0, 100, 0)); assertEquals(List.of(ttd.TRANSACTION_13, ttd.TRANSACTION_12, ttd.TRANSACTION_11), transactions); }