@Test
public void testCreateVariableStringObjectNextFactory() {

    VariableResolverFactory nextFactory = createMock(VariableResolverFactory.class);
    VariableResolver resolver = createMock(VariableResolver.class);
    expect(nextFactory.createVariable("myName", "myValue")).andReturn(resolver);
    replay(factory, request, applicationContext, nextFactory, resolver);
    factory.setNextFactory(nextFactory);
    assertEquals(resolver, factory.createVariable("myName", "myValue"));
    verify(factory, request, applicationContext, nextFactory, resolver);
}