@Test
public void removesDuplicatedAuthSubjectsFromHeaderMap() {

    final String expectedWithoutDups = AUTH_CONTEXT_WITHOUT_DUPLICATES.toJsonString();
    final String withDups = AUTH_CONTEXT.toJsonString();
    final Map<String, String> headersWithDuplicatedAuthSubjects = new HashMap<>();
    headersWithDuplicatedAuthSubjects.put(DittoHeaderDefinition.AUTHORIZATION_CONTEXT.getKey(), withDups);
    final ImmutableDittoHeaders dittoHeaders = ImmutableDittoHeaders.of(headersWithDuplicatedAuthSubjects);
    assertThat(dittoHeaders.get(DittoHeaderDefinition.AUTHORIZATION_CONTEXT.getKey())).isEqualTo(
            expectedWithoutDups);
}