public void testBasicUseCase() throws Exception {
URL configUrl = TestUtils.getResourceUrl( this.getClass(), "hostmap.txt" );
UrlRewriteEnvironment environment = EasyMock.createNiceMock( UrlRewriteEnvironment.class );
EasyMock.expect( environment.getResource( "/WEB-INF/hostmap.txt" ) ).andReturn( configUrl ).anyTimes();
Resolver resolver = EasyMock.createNiceMock( Resolver.class );
EasyMock.expect( resolver.resolve( "host" ) ).andReturn( Arrays.asList( "test-inbound-host" ) ).anyTimes();
EasyMock.replay( environment, resolver );
UrlRewriteRulesDescriptor descriptor = UrlRewriteRulesDescriptorFactory.create();
UrlRewriteRuleDescriptor rule = descriptor.addRule( "test-rule" );
rule.pattern( "{*}://{host}:{*}/{**}?{**}" );