### Question:
Document { public boolean hasHeader(Header header, boolean strictCheck) { if (!strictCheck) { try { String fileHeader = readFirstLines(file, header.getLineCount() + 10, encoding); String fileHeaderOneLine = remove(fileHeader, headerDefinition.getFirstLine().trim(), headerDefinition.getEndLine().trim(), headerDefinition.getBeforeEachLine().trim(), "\n", "\r", "\t", " "); String headerOnOnelIne = mergeProperties(header.asOneLineString()); return fileHeaderOneLine.contains(remove(headerOnOnelIne, headerDefinition.getFirstLine().trim(), headerDefinition.getEndLine().trim(), headerDefinition.getBeforeEachLine().trim())); } catch (IOException e) { throw new IllegalStateException("Cannot read file " + getFilePath() + ". Cause: " + e.getMessage(), e); } } try { return header.isMatchForText(this, headerDefinition, true, encoding); } catch (IOException e) { throw new IllegalStateException("Cannot read file " + getFilePath() + ". Cause: " + e.getMessage(), e); } } Document(File file, HeaderDefinition headerDefinition, String encoding, String[] keywords, DocumentPropertiesLoader documentPropertiesLoader); HeaderDefinition getHeaderDefinition(); File getFile(); String getFilePath(); String getEncoding(); boolean isNotSupported(); boolean hasHeader(Header header, boolean strictCheck); void updateHeader(Header header); String mergeProperties(String str); void save(); void saveTo(File dest); String getContent(); void removeHeader(); boolean is(Header header); void parseHeader(); boolean headerDetected(); @Override String toString();  }### Answer:
@Test public void test_hasHeader() throws Exception { Document doc = new Document( new File("src/test/resources/doc/doc1.txt"), DocumentType.TXT.getDefaultHeaderType().getDefinition(), System.getProperty("file.encoding"), new String[]{"copyright"}, loader); assertFalse(doc.hasHeader(header, true)); }