PlanningSolutionCopyValidator implements CopyValidator<DataObject> { @Override public boolean accept(final Path path) { return path.getFileName().endsWith(".java"); } @Inject  PlanningSolutionCopyValidator(final DataModelerService dataModelerService,
                                         @Named("ioStrategy") final IOService ioService); @Override Collection<ValidationMessage> validate(final Path dataObjectPath,
                                                  final DataObject dataObject); @Override Collection<ValidationMessage> validate(final Path path); @Override boolean accept(final Path path);  }
@Test public void accept() { assertTrue(copyValidator.accept(dataObjectPath)); Path propertiesPath = mock(Path.class); when(propertiesPath.getFileName()).thenReturn("Test.properties"); assertFalse(copyValidator.accept(propertiesPath)); }