public void testPowerPoint() throws Exception {
InputStream input = OOXMLParserTest.class
.getResourceAsStream("/test-documents/testPPT.pptx");
Parser parser = new AutoDetectParser();
Metadata metadata = new Metadata();
// TODO: should auto-detect without the resource name
metadata.set(Metadata.RESOURCE_NAME_KEY, "testPPT.pptx");
ContentHandler handler = new BodyContentHandler();
try {
parser.parse(input, handler, metadata);
assertEquals(
"application/vnd.openxmlformats-officedocument.presentationml.presentation",
metadata.get(Metadata.CONTENT_TYPE));
assertEquals("Sample Powerpoint Slide", metadata.get(Metadata.TITLE));