ThingAcknowledgementFactory { public static Acknowledgement newAcknowledgement(final AcknowledgementLabel label, final ThingId thingId, final HttpStatusCode statusCode, final DittoHeaders dittoHeaders, @Nullable final JsonValue payload) { return Acknowledgement.of(label, thingId, statusCode, dittoHeaders, payload); } private  ThingAcknowledgementFactory(); static Acknowledgement newAcknowledgement(final AcknowledgementLabel label,
            final ThingId thingId,
            final HttpStatusCode statusCode,
            final DittoHeaders dittoHeaders,
            @Nullable final JsonValue payload); static Acknowledgement newAcknowledgement(final AcknowledgementLabel label,
            final ThingId thingId,
            final HttpStatusCode statusCode,
            final DittoHeaders dittoHeaders); static JsonParser getJsonParser(); static Acknowledgement fromJson(final JsonObject jsonObject);  }
@Test public void newAcknowledgementReturnsExpected() { final Acknowledgement acknowledgement = ThingAcknowledgementFactory.newAcknowledgement(KNOWN_LABEL, KNOWN_THING_ID, KNOWN_STATUS_CODE, dittoHeaders, KNOWN_PAYLOAD); try (final AutoCloseableSoftAssertions softly = new AutoCloseableSoftAssertions()) { softly.assertThat((CharSequence) acknowledgement.getLabel()) .as("same label") .isEqualTo(KNOWN_LABEL); softly.assertThat((CharSequence) acknowledgement.getEntityId()) .as("same entity ID") .isEqualTo(KNOWN_THING_ID); softly.assertThat(acknowledgement.getType()) .as("same type") .isEqualTo(Acknowledgement.getType(KNOWN_THING_ID.getEntityType())); softly.assertThat(acknowledgement.getStatusCode()) .as("same status code") .isEqualTo(KNOWN_STATUS_CODE); softly.assertThat(acknowledgement.getDittoHeaders()) .as("same DittoHeaders") .isEqualTo(dittoHeaders); softly.assertThat(acknowledgement.getEntity()) .as("same entity") .contains(KNOWN_PAYLOAD); } }