@Test public void testToContext() throws Exception { final MethodCall<ParametersPassesExpressionUnitTest> methodCall = toMethodCall(ParametersPassesExpressionUnitTest.class, this, "test", "a", 1, "b", 2); final StandardEvaluationContext context = new Evaluator().toContext(methodCall); assertThat(context.getRootObject().getValue(), is((Object) methodCall)); assertThat(context.lookupVariable("methodName"), is((Object) "test")); assertThat(context.lookupVariable("parameters"), is((Object) methodCall.getParameters())); assertThat(context.getPropertyAccessors(), is(Evaluator.DEFAULT_PROPERTY_ACCESSORS)); }