@Test
public void testExecuteListAttribute() throws IOException {

    TilesContainer container = createMock(TilesContainer.class);
    Request request = createMock(Request.class);
    ModelBody modelBody = createMock(ModelBody.class);
    AttributeContext attributeContext = createMock(AttributeContext.class);
    Deque<Object> composeStack = new ArrayDeque<Object>();
    ListAttribute listAttribute = new ListAttribute();
    composeStack.push(listAttribute);
    Map<String, Object> requestScope = new HashMap<String, Object>();
    requestScope.put(ComposeStackUtil.COMPOSE_STACK_ATTRIBUTE_NAME, composeStack);
    requestScope.put(TilesAccess.CURRENT_CONTAINER_ATTRIBUTE_NAME, container);
    ApplicationContext applicationContext = createMock(ApplicationContext.class);
    expect(request.getApplicationContext()).andReturn(applicationContext);
    expect(request.getContext("request")).andReturn(requestScope).anyTimes();
    expect(container.getAttributeContext(request)).andReturn(attributeContext);
    attributeContext.putAttribute(eq("myName"), (Attribute) notNull(), eq(false));
    expect(modelBody.evaluateAsString()).andReturn(null);
    replay(container, attributeContext, request, applicationContext, modelBody);
    model.execute("myName", "myValue", "myExpression", "myRole",
            "myType", false, request, modelBody);
    verify(container, attributeContext, request, applicationContext, modelBody);
}