@Test
public void putHeadersContainingValidMetadata() {

    final MetadataHeaderKey metadataKey = MetadataHeaderKey.parse("*/issuedAt");
    final JsonValue metadataValue = JsonValue.of(String.valueOf(Instant.now()));
    final Map<String, String> headerMap = new HashMap<>();
    headerMap.put("foo", "bar");
    headerMap.put(metadataKey.toString(), metadataValue.toString());
    headerMap.put(DittoHeaderDefinition.CORRELATION_ID.getKey(), String.valueOf(UUID.randomUUID()));
    final DittoHeaders dittoHeaders = underTest.putHeaders(headerMap).build();
    assertThat(dittoHeaders).isEqualTo(headerMap);
}