String filename, text;
// With a header on the notes
filename = dirname + "/45537_Header.ppt";
HSLFSlideShow hslf = new HSLFSlideShow(new FileInputStream(filename));
SlideShow ss = new SlideShow(hslf);
assertNotNull(ss.getNotesHeadersFooters());
assertEquals("testdoc test phrase", ss.getNotesHeadersFooters().getHeaderText());
ppe = new PowerPointExtractor(hslf);
text = ppe.getText();
assertFalse("Unable to find expected word in text\n" + text, contains(text, "testdoc"));
assertFalse("Unable to find expected word in text\n" + text, contains(text, "test phrase"));
ppe.setNotesByDefault(true);
text = ppe.getText();
assertTrue("Unable to find expected word in text\n" + text, contains(text, "testdoc"));
assertTrue("Unable to find expected word in text\n" + text, contains(text, "test phrase"));
// And with a footer, also on notes
filename = dirname + "/45537_Footer.ppt";
hslf = new HSLFSlideShow(new FileInputStream(filename));
ss = new SlideShow(hslf);
assertNotNull(ss.getNotesHeadersFooters());
assertEquals("testdoc test phrase", ss.getNotesHeadersFooters().getFooterText());
ppe = new PowerPointExtractor(filename);
text = ppe.getText();
assertFalse("Unable to find expected word in text\n" + text, contains(text, "testdoc"));