Arrays.asList(new String[] { "request", "session", "application" }))
.anyTimes();
expect(request.getContext("application")).andReturn(applicationScope).anyTimes();
replay(request, applicationContext);
VariableResolver resolver = factory.createVariableResolver("one");
assertEquals(1, resolver.getValue());
assertEquals(Integer.class, resolver.getType());
resolver = factory.createVariableResolver("two");
assertEquals(2, resolver.getValue());
resolver = factory.createVariableResolver("three");
assertEquals("three", resolver.getValue());
resolver = factory.createVariableResolver("four");
assertEquals(Object.class, resolver.getType());
assertNull(resolver.getValue());
verify(request, applicationContext);
}