use of com.yahoo.vespa.config.server.http.HttpListConfigsHandler.ListConfigsResponse in project vespa by vespa-engine.
the class HttpListConfigsHandlerTest method require_url_building_and_mimetype_correct.
@Test
public void require_url_building_and_mimetype_correct() {
HttpListConfigsHandler.ListConfigsResponse resp = new ListConfigsResponse(new HashSet<ConfigKey<?>>(), null, "http://foo.com/config/v1/", true);
assertEquals(resp.toUrl(new ConfigKey<>("myconfig", "my/id", "mynamespace"), true), "http://foo.com/config/v1/mynamespace.myconfig/my/id");
assertEquals(resp.toUrl(new ConfigKey<>("myconfig", "my/id", "mynamespace"), false), "http://foo.com/config/v1/mynamespace.myconfig/my/id/");
assertEquals(resp.getContentType(), "application/json");
}
Aggregations