public class BindMetadataToHeadersTest {
Injector injector = Guice.createInjector();
BindMetadataToHeaders binder = injector.getInstance(BindMetadataToHeaders.class);
public void testGood() {
AtmosObject object = injector.getInstance(AtmosObject.Factory.class).create(null);
Payload payload = Payloads.newStringPayload("");
object.setPayload(payload);
object.getUserMetadata().getListableMetadata().put("apple", "bear");
object.getUserMetadata().getListableMetadata().put("sushi", "king");
HttpRequest request = HttpRequest.builder().method("GET").endpoint("http://localhost").build();
request = binder.bindToRequest(request, object);
assertEquals(request.getFirstHeaderOrNull("x-emc-listable-meta"), "apple=bear,sushi=king");
}