WordTemplate implements Template<E> { public TemplateData getTemplateData() { return persistentData; } 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 updateWithLockingUser() throws IOException { User user = new User("user1", "user1"); WordTemplate<?> wordTemplate = createWordTemplate(TEST_TEXTFILE); byte[] content=wordTemplate.getTemplateData().getContent(); wordTemplate.getTemplateData().setContent(content, user); updateContent(wordTemplate, user, EMPTY_WORD); checkUpdateContent(wordTemplate, user, EMPTY_WORD); }