@Test
public void toTestDocument() throws IOException, Docx4JException {

	when(templateContext.resolveValue("value")).thenReturn(TestDataModel.STRING_TEXT);
	WordTemplate<String> wordTemplate = createWordTemplate("org/wte4j/impl/simpleTemplate.docx");
	File generatedDocument = File.createTempFile("generated", "docx");
	try (OutputStream out = new FileOutputStream(generatedDocument)) {
		wordTemplate.toTestDocument(out);
		WordprocessingMLPackage wordMLPackage = WordprocessingMLPackage
				.load(generatedDocument);
		String content = XmlUtils.marshaltoString(wordMLPackage
				.getMainDocumentPart().getContents(), true);
		assertTrue(content.contains(TestDataModel.STRING_TEXT));
	} finally {
		generatedDocument.delete();
	}
}