WordTemplate implements Template<E> { public User getEditor() { return persistentData.getEditor(); } 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 updateWithNonWordDocument() throws IOException { WordTemplate<String> template = createWordTemplate(EMPTY_WORD); User editor = template.getEditor(); try { updateContent(template, new User("user", "user"), TEST_TEXTFILE); fail("Exception expected"); } catch (WteException e) { checkUpdateContent(template, editor, EMPTY_WORD); } }