DefaultVelocityEngine implements VelocityEngine { @Override public boolean evaluate(Context context, Writer out, String templateName, String source) throws XWikiVelocityException { return evaluate(context, out, templateName, new StringReader(source)); }  @Override void initialize(Properties overridingProperties); @Override boolean evaluate(Context context, Writer out, String templateName, String source); @Override boolean evaluate(Context context, Writer out, String namespace, Reader source); @Override @Deprecated void clearMacroNamespace(String namespace); @Override void startedUsingMacroNamespace(String namespace); @Override void stoppedUsingMacroNamespace(String namespace);  }
@Test void evaluateWhenNotInitialized() { Throwable exception = assertThrows(XWikiVelocityException.class, () -> { this.engine.evaluate(null, new StringWriter(), null, (Reader) null); }); assertEquals("This Velocity Engine has not yet been initialized. " + "You must call its initialize() method before you can use it.", exception.getMessage()); }