@Test public void testAddDependencyNullFile() { NullPointerException e = assertThrows(NullPointerException.class, () -> { adder.addDependency(null); }); assertThat(e.getMessage()).isEqualTo("Dependent file cannot be a null reference."); }
protected void addDependency(final File dependency) { if (dependency == null) throw new NullPointerException("Dependent file cannot be a null reference."); dependencies.add(dependency); }
AbstractCompilerAdder { protected void addDependency(final File dependency) { if (dependency == null) throw new NullPointerException("Dependent file cannot be a null reference."); dependencies.add(dependency); } }
AbstractCompilerAdder { protected void addDependency(final File dependency) { if (dependency == null) throw new NullPointerException("Dependent file cannot be a null reference."); dependencies.add(dependency); }  }
AbstractCompilerAdder { protected void addDependency(final File dependency) { if (dependency == null) throw new NullPointerException("Dependent file cannot be a null reference."); dependencies.add(dependency); }   }
AbstractCompilerAdder { protected void addDependency(final File dependency) { if (dependency == null) throw new NullPointerException("Dependent file cannot be a null reference."); dependencies.add(dependency); }    }