bindings.put("initial_velocity", 30.0);
bindings.put("initial_height", 30.0);
bindings.put("system", "metric");
Object receiver = instance.eval(reader, bindings);
Class returnType = PositionFunction.class;
PositionFunction result = (PositionFunction) ((Invocable)instance).getInterface(receiver, returnType);
double expResult = 75.9;
double t = 3.0;
assertEquals(expResult, result.getPosition(t), 0.1);
expResult = 20.2;
t = 1.0;
assertEquals(expResult, result.getVelocity(t), 0.1);
instance.getBindings(ScriptContext.ENGINE_SCOPE).clear();
instance = null;
}