@Test
public void testBindMap() {
BindMapAsMetadata binder = new BindMapAsMetadata(xml);
HttpRequest request = HttpRequest.builder().method("GET").endpoint("http://momma").build();
request = binder.bindToRequest(request, ImmutableMap.of("foo", "bar"));
assertEquals(request.getPayload().getRawContent(),
XMLParser.DEFAULT_XML_HEADER + "\n"+
"<Metadata xmlns=\"http://www.vmware.com/vcloud/v1.5\">" + "\n"+
" <MetadataEntry>" + "\n" +
" <Key>foo</Key>" + "\n" +
" <Value>bar</Value>" + "\n" +
" </MetadataEntry>" + "\n" +
"</Metadata>" + "\n");
assertEquals(request.getPayload().getContentMetadata().getContentType(), MediaType.APPLICATION_XML);
}