@SuppressWarnings("unchecked")
@Test
public void testGetDefinitionContainer() {

    Request request = createMock(Request.class);
    Map<String, Object> scope = createMock(Map.class);
    Definition definition = createMock(Definition.class);
    expect(request.getContext("request")).andReturn(scope);
    expect(scope.get(DEFAULT_DEFINITIONS_ATTRIBUTE_NAME)).andReturn(
            null);
    expect(wrapped.getDefinition("definition", request)).andReturn(
            definition);
    replay(wrapped, request, scope, definition);
    assertSame(definition, container.getDefinition("definition", request));
    verify(wrapped, request, scope, definition);
}