facade.listen();
final URI uri = UriBuilder
.fromUri(String.format("http://localhost:%d/", port))
.path("/a").build();
try {
new JdkRequest(uri)
.header(HttpHeaders.ACCEPT, MediaType.TEXT_PLAIN)
.header(
HttpHeaders.AUTHORIZATION,
String.format(
"Basic %s",
Base64.encodeBase64String("a:b".getBytes())
)
)
.header(
HttpHeaders.IF_MODIFIED_SINCE,
DateUtils.formatDate(new Date(2000L))
).uri().back().fetch().as(RestResponse.class)
.assertStatus(HttpURLConnection.HTTP_OK);
new JdkRequest(uri)
.header(HttpHeaders.ACCEPT, MediaType.TEXT_PLAIN)
.header(
HttpHeaders.AUTHORIZATION,
String.format(
"Basic %s",