### Question:
Document { public boolean is(Header header) { try { return header.getLocation().isFromUrl(this.file.toURI().toURL()); } catch (Exception e) { throw new IllegalStateException("Error comparing document " + this.file + " with file " + file + ". 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_isHeader() 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.is(header)); doc = new Document( new File("src/test/resources/test-header1.txt"), DocumentType.TXT.getDefaultHeaderType().getDefinition(), System.getProperty("file.encoding"), new String[]{"copyright"}, loader); assertTrue(doc.is(header)); }