@Test public void inject_field_multiple_key_names() {

  BaggageField userId = BaggageField.create("userId");
  BaggageField sessionId = BaggageField.create("sessionId");
  SingleBaggageField userIdConfig = SingleBaggageField.newBuilder(userId)
    .addKeyName("userId")
    .addKeyName("baggage-userId")
    .addKeyName("baggage_userId")
    .build();
  SingleBaggageField sessionIdConfig = SingleBaggageField.newBuilder(sessionId)
    .addKeyName("sessionId")
    .addKeyName("baggage-sessionId")
    .addKeyName("baggage_sessionId")
    .build();
  factory = newFactoryBuilder(B3SinglePropagation.FACTORY)
    .add(userIdConfig)
    .add(sessionIdConfig)
    .build();
  initialize();
  userId.updateValue(context, "bob");
  sessionId.updateValue(context, "12345");
  injector.inject(context, request);
  // NOTE: the labels are downcased
  assertThat(request).containsOnly(
    entry("b3", B3SingleFormat.writeB3SingleFormat(context)),
    entry("userid", "bob"),
    entry("sessionid", "12345"),
    entry("baggage-userid", "bob"),
    entry("baggage-sessionid", "12345"),
    entry("baggage_userid", "bob"),
    entry("baggage_sessionid", "12345")
  );
}