ObservableClassFile implements ResourceChangeObservableFile { @Override public boolean accept(final Path path) { final String fileName = path.getFileName(); return fileName.endsWith("." + EXTENSION); }  @Override boolean accept(final Path path);  }
@Test public void testAcceptWithoutClassFile() { doReturn("Cheese.txt").when(path).getFileName(); assertFalse(observer.accept(path)); }
@Test public void testAcceptWithClassFile() { doReturn("Cheese." + ObservableClassFile.EXTENSION).when(path).getFileName(); assertTrue(observer.accept(path)); }