@Test
public void testPRTParserComplex() throws Exception {

   try (InputStream input = getResourceAsStream("/test-documents/testCADKEY2.prt")) {
      Metadata metadata = new Metadata();
      ContentHandler handler = new BodyContentHandler();
      new PRTParser().parse(input, handler, metadata);
      assertEquals("application/x-prt", metadata.get(Metadata.CONTENT_TYPE));
      // File has both a date and a description
      assertEquals("1997-04-01T08:59:00",
              metadata.get(TikaCoreProperties.CREATED));
      assertEquals("TIKA TEST PART DESCRIPTION INFORMATION\r\n",
              metadata.get(TikaCoreProperties.DESCRIPTION));
      String contents = handler.toString();
      assertContains("ITEM", contents);
      assertContains("REQ.", contents);
      assertContains("DESCRIPTION", contents);
      assertContains("MAT'L", contents);
      assertContains("TOLERANCES UNLESS", contents);
      assertContains("FRACTIONS", contents);
      assertContains("ANGLES", contents);
      assertContains("Acme Corporation", contents);
      assertContains("DATE", contents);
      assertContains("CHANGE", contents);
      assertContains("DRAWN BY", contents);
      assertContains("SCALE", contents);
      assertContains("TIKA TEST DRAWING", contents);
      assertContains("TIKA LETTERS", contents);
      assertContains("5.82", contents);
      assertContains("112" + '\u00b0', contents); // Degrees
      assertContains("TIKA TEST LETTER", contents);
      assertContains("17.11", contents);
      assertContains('\u00d8' + "\ufffd2.000", contents); // Diameter
      assertContains("Diameter", contents);
      assertContains("The Apache Tika toolkit", contents);
   }
}