@Test
public void testExecuteAll() {

    TilesContainer container = createMock(TilesContainer.class);
    Request request = createMock(Request.class);
    AttributeContext attributeContext = createMock(AttributeContext.class);
    Attribute attribute1 = new Attribute("myValue1");
    Attribute attribute2 = new Attribute("myValue2");
    Attribute attribute3 = new Attribute("myValue3");
    Set<String> cascadedNames = new HashSet<String>();
    cascadedNames.add("myName1");
    cascadedNames.add("myName2");
    Set<String> localNames = new HashSet<String>();
    localNames.add("myName1");
    localNames.add("myName3");
    ApplicationContext applicationContext = createMock(ApplicationContext.class);
    Map<String, Object> requestScope = new HashMap<String, Object>();
    requestScope.put(TilesAccess.CURRENT_CONTAINER_ATTRIBUTE_NAME, container);
    expect(request.getApplicationContext()).andReturn(applicationContext);
    expect(request.getContext("request")).andReturn(requestScope).anyTimes();
    expect(container.getAttributeContext(request)).andReturn(attributeContext);
    expect(attributeContext.getCascadedAttributeNames()).andReturn(cascadedNames);
    expect(attributeContext.getLocalAttributeNames()).andReturn(localNames);
    expect(attributeContext.getAttribute("myName1")).andReturn(attribute1).times(2);
    expect(attributeContext.getAttribute("myName2")).andReturn(attribute2);
    expect(attributeContext.getAttribute("myName3")).andReturn(attribute3);
    expect(container.evaluate(attribute1, request)).andReturn("myEvaluatedValue1").times(2);
    expect(container.evaluate(attribute2, request)).andReturn("myEvaluatedValue2");
    expect(container.evaluate(attribute3, request)).andReturn("myEvaluatedValue3");
    replay(container, attributeContext, request, applicationContext);
    model.execute(null, "request", null, false, request);
    Map<String, Object> attributes = requestScope;
    assertEquals(ATTRIBUTES_SIZE, attributes.size());
    assertEquals("myEvaluatedValue1", attributes.get("myName1"));
    assertEquals("myEvaluatedValue2", attributes.get("myName2"));
    assertEquals("myEvaluatedValue3", attributes.get("myName3"));
    verify(container, attributeContext, request, applicationContext);
}