### Question:
HttpResponseMetadataHelper { public static HttpResponse updateMetadata(HttpResponse response, Map<String, String> values) { Map<String, String> metadata = Maps.newHashMap(response.getMetadata()); for (Map.Entry<String, String> val : values.entrySet()) { metadata.put(val.getKey(), val.getValue()); } return new HttpResponseBuilder(response).setMetadata(metadata).create(); }  static HttpResponse updateMetadata(HttpResponse response, Map<String, String> values); String getHash(HttpResponse response); static HttpResponse updateHash(HttpResponse response, HttpResponseMetadataHelper helper); static final String DATA_HASH; static final String IMAGE_HEIGHT; static final String IMAGE_WIDTH; }### Answer:
@Test public void testUpdateMetadata() { HttpResponse local = new HttpResponseBuilder() .setResponseString("data1") .create(); HttpResponse compiled = HttpResponseMetadataHelper.updateMetadata(local, ImmutableMap.<String, String>of("K", "V")); assertEquals(1, compiled.getMetadata().size()); assertEquals("V", compiled.getMetadata().get("K")); HttpResponse compiled2 = HttpResponseMetadataHelper.updateMetadata(compiled, ImmutableMap.<String, String>of("K2", "V2")); assertEquals(2, compiled2.getMetadata().size()); assertEquals("V2", compiled2.getMetadata().get("K2")); HttpResponse compiled3 = HttpResponseMetadataHelper.updateMetadata(compiled2, ImmutableMap.<String, String>of("K", "V3")); assertEquals(2, compiled3.getMetadata().size()); assertEquals("V3", compiled3.getMetadata().get("K")); }