### Question:
FileSource implements Source { public FileSource( File file ) { this.file = Objects.requireNonNull( file, "file cannot be null" ).getAbsoluteFile(); this.hashCode = Objects.hash( file ); } FileSource( File file ); @Override InputStream getInputStream(); @Override String getLocation(); File getFile(); @Override String toString(); @Override int hashCode(); @Override boolean equals( Object obj );  }### Answer:
@Test public void testFileSource() { try { new FileSource( null ); fail( "Should fail, since you must specify a file" ); } catch ( NullPointerException e ) { assertEquals( "file cannot be null", e.getMessage() ); } }