{
MockControl control = newControl(HttpServletRequest.class);
HttpServletRequest request = (HttpServletRequest) control.getMock();
HttpServletResponse response = newResponse();
ServletRequestServicer servicer = newServicer();
Throwable t = new AbstractMethodError();
request.getCharacterEncoding();
control.setReturnValue(null);
request.setCharacterEncoding("output-encoding");
control.setThrowable(t);
servicer.service(request, response);
replayControls();
SetupRequestEncoding sre = new SetupRequestEncoding();
sre.setOutputEncoding("output-encoding");
sre.service(request, response, servicer);
verifyControls();
// Check that, after such an error, we don't even try to do it again.
servicer.service(request, response);
replayControls();
sre.service(request, response, servicer);