### Question:
HeaderParser { public boolean gotAnyHeader() { return existingHeader; } HeaderParser(FileContent fileContent, HeaderDefinition headerDefinition, String[] keywords); int getBeginPosition(); int getEndPosition(); boolean gotAnyHeader(); FileContent getFileContent(); HeaderDefinition getHeaderDefinition();  }### Answer:
@Test public void test_no_header() throws Exception { HeaderParser parser = new HeaderParser(new FileContent(new File("src/test/resources/doc/doc1.txt"), System.getProperty("file.encoding")), HeaderType.TEXT.getDefinition(), new String[]{"copyright"}); assertFalse(parser.gotAnyHeader()); }
@Test public void test_parsing_xml3() throws Exception { HeaderParser parser = new HeaderParser(new FileContent(new File("src/test/resources/doc/doc6.xml"), System.getProperty("file.encoding")), HeaderType.XML_STYLE.getDefinition(), new String[]{"copyright"}); assertFalse(parser.gotAnyHeader()); }
@Test public void test_parsing_xml4() throws Exception { HeaderParser parser = new HeaderParser(new FileContent(new File("src/test/resources/doc/doc7.xml"), System.getProperty("file.encoding")), HeaderType.XML_STYLE.getDefinition(), new String[]{"copyright"}); assertFalse(parser.gotAnyHeader()); }
@Test public void test_parsing_xml5() throws Exception { HeaderParser parser = new HeaderParser(new FileContent(new File("src/test/resources/doc/doc8.xml"), System.getProperty("file.encoding")), HeaderType.XML_STYLE.getDefinition(), new String[]{"copyright"}); assertFalse(parser.gotAnyHeader()); }