### Question:
DiscoveryService { @GET @Produces( MediaType.WILDCARD ) public Response redirectToBrowser() { return outputFormat.seeOther( config.get( ServerSettings.browser_path ) ); } DiscoveryService( @Context Config config, @Context OutputFormat outputFormat, @Context DiscoverableURIs uris ); @GET @Produces( MediaType.APPLICATION_JSON ) Response getDiscoveryDocument( @Context UriInfo uriInfo ); @GET @Produces( MediaType.WILDCARD ) Response redirectToBrowser();  }### Answer:
@Test public void shouldReturnRedirectToAbsoluteAPIUsingOutputFormat() throws Exception { Config config = Config.defaults( ServerSettings.browser_path, "/browser/" ); String baseUri = "http: DiscoveryService ds = new DiscoveryService( config, new EntityOutputFormat( new JsonFormat(), new URI( baseUri ), null ), communityDiscoverableURIs( config, null ) ); Response response = ds.redirectToBrowser(); assertThat( response.getMetadata().getFirst( "Location" ), is( new URI( "http: }