ParseSystemAndUserMetadataFromHeaders implements Function<HttpResponse, MutableBlobMetadata>,
         InvocationContext<ParseSystemAndUserMetadataFromHeaders> { protected void addETagTo(HttpResponse from, MutableBlobMetadata metadata) { String eTag = from.getFirstHeaderOrNull(HttpHeaders.ETAG); if (metadata.getETag() == null && eTag != null) { metadata.setETag(eTag); } } @Inject  ParseSystemAndUserMetadataFromHeaders(Provider<MutableBlobMetadata> metadataFactory, DateService dateParser,
            @Named(PROPERTY_USER_METADATA_PREFIX) String metadataPrefix); MutableBlobMetadata apply(HttpResponse from); ParseSystemAndUserMetadataFromHeaders setContext(HttpRequest request); ParseSystemAndUserMetadataFromHeaders setName(String name);  }
@Test public void testAddETagTo() { HttpResponse from = HttpResponse.builder() .statusCode(200).message("ok") .payload("") .addHeader(HttpHeaders.ETAG, "0xfeb").build(); MutableBlobMetadata metadata = blobMetadataProvider.get(); parser.addETagTo(from, metadata); assertEquals(metadata.getETag(), "0xfeb"); }