@Test
public void testGetNestedObject() {

    Request request = createMock(Request.class);
    ApplicationContext applicationContext = createMock(ApplicationContext.class);
    expect(request.getApplicationContext()).andReturn(applicationContext);
    replay(request, applicationContext);
    NestedObjectExtractor<Request> extractor = new TilesApplicationContextNestedObjectExtractor();
    assertEquals(applicationContext, extractor.getNestedObject(request));
    verify(request, applicationContext);
}