### Question:
DefaultSubscriptionService implements SubscriptionService { @Override public void unregisterContractEventFilter(String filterId) throws NotFoundException { unregisterContractEventFilter(filterId, true); } @Autowired  DefaultSubscriptionService(ChainServicesContainer chainServices,
                                      ContractEventFilterRepository eventFilterRepository,
                                      EventeumEventBroadcaster eventeumEventBroadcaster,
                                      List<BlockListener> blockListeners,
                                      @Qualifier("eternalRetryTemplate") RetryTemplate retryTemplate,
                                      EventSyncService eventSyncService); void init(List<ContractEventFilter> initFilters); @Override ContractEventFilter registerContractEventFilter(ContractEventFilter filter, boolean broadcast); @Override @Async ContractEventFilter registerContractEventFilterWithRetries(ContractEventFilter filter, boolean broadcast); @Override List<ContractEventFilter> listContractEventFilters(); @Override void unregisterContractEventFilter(String filterId); @Override void unregisterContractEventFilter(String filterId, boolean broadcast); @Override void unsubscribeToAllSubscriptions(String nodeName); @Override SubscriptionServiceState getState();  }### Answer:
@Test public void testUnregisterContractEventFilter() throws NotFoundException { final ContractEventFilter filter = createEventFilter(); underTest.registerContractEventFilter(filter, false); underTest.unregisterContractEventFilter(FILTER_ID); verify(mockRepo, times(1)).deleteById(FILTER_ID); verify(mockFilterBroadcaster, times(1)).broadcastEventFilterRemoved(filter); assertEquals(0, underTest.listContractEventFilters().size()); boolean exceptionThrown = false; try { underTest.unregisterContractEventFilter(FILTER_ID); } catch (NotFoundException e) { exceptionThrown = true; } assertEquals(true, exceptionThrown); }