public void setUp()
{
Map<HttpReverseProxyPathMapper, RewriterController> rewriterControllerMap = new HashMap<HttpReverseProxyPathMapper, RewriterController>();
Map<HttpReverseProxyPathMapper, Ruleset> rewriterRulesetMap = new HashMap<HttpReverseProxyPathMapper, Ruleset>();
List<HttpReverseProxyPathMapper> proxyPathMappers = new ArrayList<HttpReverseProxyPathMapper>();
proxyPathMappers.add(new DefaultHttpReverseProxyPathMapperImpl("localhost", "/localhost/", "http://www.localhost.com/"));
proxyPathMappers.add(new DefaultHttpReverseProxyPathMapperImpl("localhost1", "/localhost/path1/", "http://www.localhost.com/path1/"));
proxyPathMappers.add(new DefaultHttpReverseProxyPathMapperImpl("localhost2", "/localhost/path1/path2/", "http://www.localhost.com/path1/path2/"));
proxyPathMappers.add(new DefaultHttpReverseProxyPathMapperImpl("apache0", "/apache/", "http://apache.org/"));
proxyPathMappers.add(new DefaultHttpReverseProxyPathMapperImpl("apache", "/*_apache/", "http://$1.apache.org/"));
proxyPathMappers.add(new DefaultHttpReverseProxyPathMapperImpl("secure_apache", "/secure/*_apache/", "https://$1.apache.org/"));
proxyPathMappers.add(new DefaultHttpReverseProxyPathMapperImpl("google", "/*.google.*/", "http://$1.google.$2/"));
pathMapperProvider = new DefaultHttpReverseProxyPathMapperProviderImpl(proxyPathMappers, rewriterControllerMap, rewriterRulesetMap);
pathMapperProvider.setMaxMatchingPathPartCount(3);
}