@Test
public void nullsWhenParsingErrorInFile() throws Exception {

    final File source = folder.newFile("Main.java");
    try (final PrintWriter writer = new PrintWriter(source)) {
        writer.println("class A {");
        writer.println("    private public final String a = null;");
        writer.println("}");
    }
    try {
        new JavaSourceFile(source).nulls().asList();
    } catch (final NullfreeException e) {
        Assert.assertThat(e.getMessage(), StringContains.containsString("Main.java"));
    } catch (Throwable e) {
        Assert.fail();
    }
}