### Question:
PropertiesHeaderCheck implements Checker { @Override public void check(Report report, File file) { header.check(report, file); } PropertiesHeaderCheck(); @Override void check(Report report, File file);  }### Answer:
@Test public void testHeaderOnlyFile() throws Exception { HeaderCheck check = new HeaderCheck("properties-header.regex"); File file = MavenTestingUtils.getTestResourceFile("headeronly.properties"); JunitReport report = new JunitReport(); check.check(report, file); Assert.assertEquals("entry.count", 1, report.getEntryCount()); JunitReport.FileEntry entry = report.getEntry(file); Assert.assertNotNull("Should have found entry", entry); System.out.println(entry); Assert.assertEquals("Entry.type", "none", entry.type); }
@Test public void testOneLineFile() throws Exception { HeaderCheck check = new HeaderCheck("properties-header.regex"); File file = MavenTestingUtils.getTestResourceFile("oneline.properties"); JunitReport report = new JunitReport(); check.check(report, file); Assert.assertEquals("entry.count", 1, report.getEntryCount()); JunitReport.FileEntry entry = report.getEntry(file); Assert.assertNotNull("Should have found entry", entry); System.out.println(entry); Assert.assertEquals("Entry.type", "none", entry.type); }