* @throws IOException If something goes wrong.
*/
@Test
public void testExecute() throws IOException {
Request request = createMock(Request.class);
ModelBody modelBody = createMock(ModelBody.class);
Deque<Object> composeStack = new ArrayDeque<Object>();
ListAttribute listAttribute = new ListAttribute();
Attribute attribute;
composeStack.push(listAttribute);
Map<String, Object> requestScope = new HashMap<String, Object>();
requestScope.put(ComposeStackUtil.COMPOSE_STACK_ATTRIBUTE_NAME, composeStack);
expect(request.getContext("request")).andReturn(requestScope).times(2);
expect(modelBody.evaluateAsString()).andReturn(null);
expect(modelBody.evaluateAsString()).andReturn("myBody");
replay(request, modelBody);
model.execute("myValue", "myExpression", "myRole", "myType",
request, modelBody);
List<Attribute> attributes = listAttribute.getValue();