@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]));
    }
}