### Question:
Uris { @Deprecated public static Function<URI, String> parameter( final String name ) { return uri -> { if ( uri == null ) { return null; } String query = uri.getQuery(); if ( query != null ) { for ( String param : query.split( "&" ) ) { String[] keyValue = param.split( "=" ); if ( keyValue[0].equalsIgnoreCase( name ) ) { if ( keyValue.length == 2 ) { return keyValue[1]; } else { return "true"; } } } } return null; }; } private  Uris(); @Deprecated static Function<URI, String> parameter( final String name );  }### Answer:
@Test void testParam() { URI uri = URI.create("http: assertThat( parameter( "x" ).apply( uri ), equalTo( "a" ) ); assertThat( parameter( "y" ).apply( uri ), equalTo( "b" ) ); assertThat( parameter( "z" ).apply( uri ), equalTo( "true" ) ); assertThat( parameter( "foo" ).apply( uri ), nullValue() ); }