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

	WordTemplate<String> wordTemplate = createWordTemplate("org/wte4j/impl/simpleTemplate.docx");
	when(templateContext.resolveValue("value")).thenReturn("test123");
	File generatedDocument = File.createTempFile("generated", ".pdf");
	try (OutputStream out = new FileOutputStream(generatedDocument)) {
		wordTemplate.toPDFDocument("gugus", out);
		assertTrue(generatedDocument.isFile());
		assertTrue(generatedDocument.length() > 0);
		List<String> lines = FileUtils.readLines(generatedDocument);
		assertTrue(lines.size() > 0);
		assertTrue(lines.get(0).contains("PDF"));
	} finally {
		generatedDocument.deleteOnExit();
	}
}