### Question:
UrlRewriteRulesDescriptorFactory { public static UrlRewriteRulesDescriptor create() { return new UrlRewriteRulesDescriptorImpl(); } private  UrlRewriteRulesDescriptorFactory(); static UrlRewriteRulesDescriptor create(); static UrlRewriteRulesDescriptor load( String format, Reader reader ); static void store( UrlRewriteRulesDescriptor descriptor, String format, Writer writer );  }### Answer:
@Test public void testCreate() { UrlRewriteRulesDescriptor descriptor = UrlRewriteRulesDescriptorFactory.create(); assertThat( descriptor, notNullValue() ); assertThat( descriptor.getRules(), notNullValue() ); assertThat( descriptor.getRules().isEmpty(), is( true ) ); UrlRewriteRuleDescriptor rule = descriptor.newRule(); assertThat( rule, notNullValue() ); assertThat( descriptor.getRules().isEmpty(), is( true ) ); rule.name( "first" ); descriptor.addRule( rule ); assertThat( descriptor.getRules().size(), is( 1 ) ); assertThat( descriptor.getRule( "first" ), sameInstance( rule ) ); rule = descriptor.addRule( "second" ); assertNotNull(rule); assertThat( descriptor.getRules().size(), is( 2 ) ); }