Map<String, String> headers = Collections.singletonMap("Authorization", "Basic " + Base64Encoder.encode("graviaUser:graviaPass"));
// Verify that the alias is not yet available
assertNotAvailable(reqspec, headers);
HttpContext base = httpService.createDefaultHttpContext();
String realm = RuntimeType.getRuntimeType() == RuntimeType.KARAF ? "gravia" : "ApplicationRealm";
HttpContext secureContext = new SecureHttpContext(base, realm, "graviaRole");
// Register the test servlet and make a call
httpService.registerServlet("/service", new HttpServiceServlet(module), null, secureContext);
Assert.assertEquals("Hello: Kermit", performCall(reqspec, headers));