doAnswer(new Answer<Object>() {
@Override
public Object answer(InvocationOnMock invocation) throws Throwable {
printed = (String)invocation.getArguments()[0];
return new DoesNothing().answer(invocation);
}
}).when(out).print(any(String.class));
action.doGet(request, response);