### Question:
PhasingPollTable extends EntityDbTable<PhasingPoll> { public List<Transaction> getFinishingTransactions(int height) { Connection con = null; List<Transaction> transactions = new ArrayList<>(); try { con = getDatabaseManager().getDataSource().getConnection(); PreparedStatement pstmt = con.prepareStatement("SELECT transaction.* FROM transaction, phasing_poll " + "WHERE phasing_poll.id = transaction.id AND phasing_poll.finish_height = ? " + "ORDER BY transaction.height, transaction.transaction_index"); pstmt.setInt(1, height); blockchain.getTransactions(con, pstmt).forEach(transactions::add); return transactions; } catch (SQLException e) { DbUtils.close(con); LOG.error(e.getMessage(), e); throw new RuntimeException(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 testGetFinishingTransactions() { List<Transaction> finishingTransactions = table.getFinishingTransactions(ptd.POLL_2.getFinishHeight()); assertEquals(Arrays.asList(ttd.TRANSACTION_7), finishingTransactions); }
@Test void testGetFinishingTransactionsWhenNoTransactionsAtHeight() { List<Transaction> finishingTransactions = table.getFinishingTransactions(ttd.TRANSACTION_0.getHeight() - 1); assertTrue(finishingTransactions.isEmpty(), "No transactions should be found at height"); }