@Test(expected = InvalidTemplateException.class)
public void toDocumentWithInvalidDocument() throws IOException,
		Docx4JException {

	InvalidExpressionException error = new InvalidExpressionException(ExpressionError.FORMATTER_TYPE_MISSMATCH);
	when(templateContext.resolveValue(anyString())).thenThrow(error);
	WordTemplate<String> wordTemplate = createWordTemplate("org/wte4j/impl/dateValueTemplate.docx");
	OutputStream out = new ByteArrayOutputStream();
	wordTemplate.toDocument("test", out);
}