@Test
public void testExecute() throws IOException {

    TilesContainer container = createMock(TilesContainer.class);
    AttributeContext attributeContext = createMock(AttributeContext.class);
    Request request = createMock(Request.class);
    Deque<Object> composeStack = new ArrayDeque<Object>();
    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);
    ModelBody modelBody = createMock(ModelBody.class);
    modelBody.evaluateWithoutWriting();
    expect(request.getApplicationContext()).andReturn(applicationContext);
    expect(request.getContext("request")).andReturn(requestScope).anyTimes();
    expect(container.getAttributeContext(request)).andReturn(attributeContext);
    attributeContext.putAttribute(eq("myName"), isA(ListAttribute.class), eq(false));
    replay(container, attributeContext, request, modelBody);
    model.execute("myName", "myRole", false, false, request, modelBody);
    assertEquals(0, composeStack.size());
    verify(container, attributeContext, request, modelBody);
}