@Test
public void testToAdaptable() {

    final PolicyErrorResponse policyErrorResponse =
            PolicyErrorResponse.of(TestConstants.Policies.POLICY_ID, dittoRuntimeException);
    final TopicPath topicPath =
            TopicPath.newBuilder(TestConstants.Policies.POLICY_ID).policies().none().errors().build();
    final JsonPointer path = JsonPointer.empty();
    final Adaptable expected = Adaptable.newBuilder(topicPath)
            .withPayload(Payload.newBuilder(path)
                    .withValue(dittoRuntimeException.toJson(FieldType.regularOrSpecial()))
                    .withStatus(HttpStatusCode.UNAUTHORIZED)
                    .build())
            .withHeaders(TestConstants.HEADERS_V_2)
            .build();
    final Adaptable actual = underTest.toAdaptable(policyErrorResponse, TopicPath.Channel.NONE);
    assertWithExternalHeadersThat(actual).isEqualTo(expected);
}