WordMetadata { public List<WordHeading> getHeadings() { return headings; }  MSOfficeMetadata getMetadata(); void setMetadata( MSOfficeMetadata metadata ); void setMetadata( SummaryInformation info ); List<WordHeading> getHeadings(); void setHeadings( List<WordHeading> headings );  }
@Test public void shouldBeAbleToParseHeadingsForWord() throws Exception { InputStream is = getClass().getClassLoader().getResourceAsStream("word.doc"); WordMetadata wordMetadata = WordMetadataReader.instance(is); List<WordMetadata.WordHeading> headings = wordMetadata.getHeadings(); assertThat(headings.size(), is(TEST_HEADERS_TEXT.length)); for (int i = 0; i < headings.size(); i++) { assertThat(headings.get(i).getText(), is(TEST_HEADERS_TEXT[i])); assertThat(headings.get(i).getHeaderLevel(), is(TEST_HEADERS_LEVEL[i])); } }