### Question:
PhasingPollTable extends EntityDbTable<PhasingPoll> { public int getAllPhasedTransactionsCount() throws SQLException { try (Connection con = getDatabaseManager().getDataSource().getConnection(); @DatabaseSpecificDml(DmlMarker.NAMED_SUB_SELECT) PreparedStatement pstmt = con.prepareStatement("select count(*) from (select id from phasing_poll UNION select id from phasing_poll_result)")) { try (ResultSet rs = pstmt.executeQuery()) { rs.next(); return rs.getInt(1); } } } @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 testGetAllPhasedTransactionsCount() throws SQLException { int count = table.getAllPhasedTransactionsCount(); assertEquals(ptd.NUMBER_OF_PHASED_TRANSACTIONS, count); }