@Test public void testCreate() { final URI source = URI.create("file:/c:/temp/test.txt"); final URI target = URI.create("/temp/target/target.txt"); final FileRequest request = FileRequestFactory.create(source, target); assertEquals("Source URI does not match.", source.toString(), request.getSourceFile().toString()); assertEquals("Target URI does not match.", target.toString(), request.getTargetFile().toString()); }
public static FileRequest create(final URI sourceFile, final URI targetFile) { if (sourceFile == null) { throw new NullPointerException("Source file cannot be null."); } if (targetFile == null) { throw new NullPointerException("Target file cannot be null."); } return new FileRequestImpl(sourceFile, targetFile); }
FileRequestFactory { public static FileRequest create(final URI sourceFile, final URI targetFile) { if (sourceFile == null) { throw new NullPointerException("Source file cannot be null."); } if (targetFile == null) { throw new NullPointerException("Target file cannot be null."); } return new FileRequestImpl(sourceFile, targetFile); } }
FileRequestFactory { public static FileRequest create(final URI sourceFile, final URI targetFile) { if (sourceFile == null) { throw new NullPointerException("Source file cannot be null."); } if (targetFile == null) { throw new NullPointerException("Target file cannot be null."); } return new FileRequestImpl(sourceFile, targetFile); }  }
FileRequestFactory { public static FileRequest create(final URI sourceFile, final URI targetFile) { if (sourceFile == null) { throw new NullPointerException("Source file cannot be null."); } if (targetFile == null) { throw new NullPointerException("Target file cannot be null."); } return new FileRequestImpl(sourceFile, targetFile); }  static FileRequest create(final URI sourceFile, final URI targetFile); }
FileRequestFactory { public static FileRequest create(final URI sourceFile, final URI targetFile) { if (sourceFile == null) { throw new NullPointerException("Source file cannot be null."); } if (targetFile == null) { throw new NullPointerException("Target file cannot be null."); } return new FileRequestImpl(sourceFile, targetFile); }  static FileRequest create(final URI sourceFile, final URI targetFile);  }