@Test(expected = NullPointerException.class) public void testNullTargetFile() { FileRequestFactory.create(URI.create("http: }
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);  }