### Question:
ServiceUrlFunctionProcessor extends ServiceRegistryFunctionProcessorBase<ServiceUrlFunctionDescriptor> implements UrlRewriteFunctionProcessor<ServiceUrlFunctionDescriptor> { @Override public List<String> resolve( UrlRewriteContext context, List<String> parameters ) throws Exception { List<String> results = null; if( parameters != null ) { results = new ArrayList<>( parameters.size() ); for( String parameter : parameters ) { parameter = resolve( parameter ); results.add( parameter ); } } return results; }  @Override String name(); @Override List<String> resolve( UrlRewriteContext context, List<String> parameters );  }### Answer:
@Test public void testResolve() throws Exception { ServiceUrlFunctionProcessor func = new ServiceUrlFunctionProcessor(); func.initialize( env, desc ); assertThat( func.resolve( ctx, Collections.singletonList("test-service")), contains( "test-scheme: assertThat( func.resolve( ctx, Collections.singletonList("invalid-test-service")), contains( "invalid-test-service" ) ); assertThat( func.resolve( ctx, null ), nullValue() ); func.destroy(); }