DefaultVelocityFactory implements VelocityFactory { @Override public VelocityEngine removeVelocityEngine(String key) { return this.velocityEngines.remove(key); }  @Override boolean hasVelocityEngine(String key); @Override VelocityEngine getVelocityEngine(String key); @Override VelocityEngine createVelocityEngine(String key, Properties properties); @Override VelocityEngine removeVelocityEngine(String key);  }
@Test void removeVelocityEngine() throws Exception { this.velocityFactory.removeVelocityEngine("somekey"); this.componentManager.registerMockComponent(VelocityEngine.class); this.velocityFactory.createVelocityEngine("somekey", new Properties()); assertNotNull(this.velocityFactory.getVelocityEngine("somekey")); assertTrue(this.velocityFactory.hasVelocityEngine("somekey")); this.velocityFactory.removeVelocityEngine("somekey"); assertNull(this.velocityFactory.getVelocityEngine("somekey")); assertFalse(this.velocityFactory.hasVelocityEngine("somekey")); }