@Test
public void testComputeAttributeInContext() {

    TilesContainer container = createMock(TilesContainer.class);
    AttributeContext attributeContext = createMock(AttributeContext.class);
    Request request = createMock(Request.class);
    Attribute attribute = new Attribute("myValue", Expression
            .createExpression("myExpression", null), "myRole", "myRenderer");
    expect(container.getAttributeContext(request)).andReturn(attributeContext);
    expect(attributeContext.getAttribute("myName")).andReturn(attribute);
    replay(container, attributeContext, request);
    assertEquals(attribute, resolver.computeAttribute(container, null,
            "myName", null, false, null, null, null, request));
    verify(container, attributeContext, request);
}