### Question:
AbstractInvalidateDMOPackageCacheDeleteHelper implements DeleteHelper { @Override public void postProcess( final Path path ) { if ( supports( path ) ) { invalidateDMOPackageCache.fire( new InvalidateDMOPackageCacheEvent( path ) ); } } AbstractInvalidateDMOPackageCacheDeleteHelper( final T resourceType,
                                                          final Event<InvalidateDMOPackageCacheEvent> invalidateDMOPackageCache ); @Override boolean supports( final Path path ); @Override void postProcess( final Path path );  }### Answer:
@Test public void checkEventFiredWhenMatchesResourceType() { final Path path = mock(Path.class); when(path.getFileName()).thenReturn("file." + resourceType.getSuffix()); helper.postProcess(path); verify(invalidateDMOPackageCache, times(1)).fire(any(InvalidateDMOPackageCacheEvent.class)); }
@Test public void checkEventNotFiredWhenNotMatchOtherResourceTypes() { final Path path = mock(Path.class); when(path.getFileName()).thenReturn("file.smurf"); helper.postProcess(path); verify(invalidateDMOPackageCache, never()).fire(any(InvalidateDMOPackageCacheEvent.class)); }