assertNotNull(head304Etag.getETag());
assertNull(head304Etag.getLastModified());
assertNull(head304Etag.getContentLength());
System.out.println(head304Etag.getHeaders());
Get get200 = new Get(url);
get200.executeAsString();
assertTrue(get200.isOk());
assertTrue(get200.getAcceptByteRanges());
assertNotNull(get200.getETag());
assertNotNull(get200.getLastModified());
assertNotNull(get200.getContentLength());
System.out.println("GET 200: " + get200.getHeaders());
Get get304IfModifiedSince = new Get(url);
get304IfModifiedSince.setIfModifiedSince(head200.getLastModified());
get304IfModifiedSince.executeAsString();
assertTrue(get304IfModifiedSince.isNotModified());
assertFalse(get304IfModifiedSince.getAcceptByteRanges());
assertNotNull(get304IfModifiedSince.getETag());
assertNull(get304IfModifiedSince.getLastModified());
assertNull(get304IfModifiedSince.getContentLength());
System.out.println(get304IfModifiedSince.getHeaders());
Get get304Etag = new Get(url);
get304Etag.setIfNoneMatch(head200.getETag());
get304Etag.executeAsString();
assertTrue(get304Etag.isNotModified());
assertFalse(get304Etag.getAcceptByteRanges());
assertNotNull(get304Etag.getETag());
assertNull(get304Etag.getLastModified());
assertNull(get304Etag.getContentLength());
System.out.println(get304Etag.getHeaders() + "\n");
}
}