WordTemplate implements Template<E> { @Override public List<String> listContentIds() { prepareDocument(); return document.listContentIds(); } WordTemplate(TemplateData template, TemplateContextFactory contextFactory); @Override void toDocument(E data, OutputStream out); @Override void toTestDocument(OutputStream out); @Override void toPDFDocument(E data, OutputStream out); @Override String getDocumentName(); @Override Class<?> getInputType(); @Override Map<String, String> getProperties(); String getLanguage(); Locale getLocale(); User getLockingUser(); Date getCreatedAt(); User getEditor(); Date getEditedAt(); @Override void update(InputStream in, User editor); @Override Map<String, MappingDetail> getContentMapping(); @Override List<String> listContentIds(); @Override void validate(); @Override void write(File file); @Override void write(OutputStream out); TemplateData getTemplateData();  }
@Test public void listConentIds() throws IOException { WordTemplate<String> wordTemplate = createWordTemplate("org/wte4j/impl/simpleTemplate.docx"); List<String> ids = wordTemplate.listContentIds(); assertEquals(1, ids.size()); assertEquals("value", ids.get(0)); }