public class SanitizingRequestRewriterTest extends BaseRewriterTestCase {
private static final Uri CONTENT_URI = Uri.parse("www.example.org/content");
private String rewrite(HttpRequest request, HttpResponse response) throws Exception {
request.setSanitizationRequested(true);
RequestRewriter rewriter = createRewriter(Collections.<String>emptySet(),
Collections.<String>emptySet());
MutableContent mc = new MutableContent(parser, response);
if (!rewriter.rewrite(request, response, mc)) {
return null;
}
return mc.getContent();
}