DataTransformationManager { public ObjectNode transform(ObjectNode data, TransformationFunction transformationFunction) throws ScriptException, IOException, NoSuchMethodException { return executionEngine.execute(data, transformationFunction); } @Inject  DataTransformationManager(ExecutionEngine executionEngine); ObjectNode transform(ObjectNode data, TransformationFunction transformationFunction);  }
@Test public void testTransform() throws ScriptException, IOException, NoSuchMethodException { TransformationFunction function = new TransformationFunction("1", "function"); new Expectations() {{ executionEngine.execute(null, function); result = objectNode; }}; ObjectNode res = transformationManager.transform(null, function); Assert.assertEquals(objectNode, res); }