### Question:
FilterManager extends AbstractVerticle implements PrivateTransactionObserver { public List<Hash> blockChanges(final String filterId) { final BlockFilter filter = filterRepository.getFilter(filterId, BlockFilter.class).orElse(null); if (filter == null) { return null; } final List<Hash> hashes; synchronized (filter) { hashes = new ArrayList<>(filter.blockHashes()); filter.clearBlockHashes(); filter.resetExpireTime(); } return hashes; } FilterManager(
      final BlockchainQueries blockchainQueries,
      final TransactionPool transactionPool,
      final Optional<PrivacyQueries> privacyQueries,
      final FilterIdGenerator filterIdGenerator,
      final FilterRepository filterRepository); @Override void start(); @Override void stop(); String installBlockFilter(); String installPendingTransactionFilter(); String installLogFilter(
      final BlockParameter fromBlock, final BlockParameter toBlock, final LogsQuery logsQuery); String installPrivateLogFilter(
      final String privacyGroupId,
      final String enclavePublicKey,
      final BlockParameter fromBlock,
      final BlockParameter toBlock,
      final LogsQuery logsQuery); boolean uninstallFilter(final String filterId); void recordBlockEvent(final BlockAddedEvent event); @Override void onPrivateTransactionProcessed(final PrivateTransactionEvent event); List<Hash> blockChanges(final String filterId); List<Hash> pendingTransactionChanges(final String filterId); List<LogWithMetadata> logsChanges(final String filterId); List<LogWithMetadata> logs(final String filterId);  }### Answer:
@Test public void getBlockChangesShouldResetFilterExpireDate() { final BlockFilter filter = spy(new BlockFilter("foo")); doReturn(Optional.of(filter)) .when(filterRepository) .getFilter(eq("foo"), eq(BlockFilter.class)); filterManager.blockChanges("foo"); verify(filter).resetExpireTime(); }