### Question:
UrlRewriteServletEnvironment implements UrlRewriteEnvironment { @Override public List<String> resolve( String name ) { List<String> values = null; String value = context.getInitParameter( name ); if( value != null ) { values = Collections.singletonList(value); } return values; } UrlRewriteServletEnvironment( ServletContext context ); @Override URL getResource( String name ); @Override T getAttribute( String name ); @Override List<String> resolve( String name );  }### Answer:
@Test public void testResolve() throws Exception { ServletContext context = EasyMock.createNiceMock( ServletContext.class ); EasyMock.expect( context.getInitParameter( "test-parameter-name" ) ).andReturn( "test-parameter-value" ); EasyMock.replay( context ); UrlRewriteServletEnvironment env = new UrlRewriteServletEnvironment( context ); assertThat( env.resolve( "test-parameter-name" ), contains( "test-parameter-value" ) ); }