IMocksControl mocksControl = EasyMock.createControl();
Application mockApp = mocksControl.createMock(Application.class);
context.setApplication(mockApp);
ELResolver elResolver = mocksControl.createMock(ELResolver.class);
expect(mockApp.getELResolver()).andReturn(elResolver);
context.setELContext(new MockELContext());
expect(elResolver.getValue(eq(context.getELContext()), isNull(), eq("xxx"))).andReturn("testValue");
mocksControl.replay();
assertEquals("testValue", variableResolver.resolveVariable(context, "xxx"));
}