RetrieveThingDefinitionResponse extends AbstractCommandResponse<RetrieveThingDefinitionResponse> implements
        ThingQueryCommandResponse<RetrieveThingDefinitionResponse> { public static RetrieveThingDefinitionResponse of(final ThingId thingId, final ThingDefinition definition, final DittoHeaders dittoHeaders) { return new RetrieveThingDefinitionResponse(thingId, HttpStatusCode.OK, definition, dittoHeaders); } private  RetrieveThingDefinitionResponse(final ThingId thingId, final HttpStatusCode statusCode,
            final ThingDefinition definition, final DittoHeaders dittoHeaders); static RetrieveThingDefinitionResponse of(final ThingId thingId, final ThingDefinition definition,
            final DittoHeaders dittoHeaders); static RetrieveThingDefinitionResponse fromJson(final String jsonString, final DittoHeaders dittoHeaders); static RetrieveThingDefinitionResponse fromJson(final JsonObject jsonObject,
            final DittoHeaders dittoHeaders); @Override JsonSchemaVersion[] getSupportedSchemaVersions(); @Override ThingId getThingEntityId(); ThingDefinition getThingDefinition(); @Override JsonValue getEntity(final JsonSchemaVersion schemaVersion); @Override RetrieveThingDefinitionResponse setEntity(final JsonValue entity); @Override RetrieveThingDefinitionResponse setDittoHeaders(final DittoHeaders dittoHeaders); @Override JsonPointer getResourcePath(); @Override boolean equals(@Nullable final Object o); @Override int hashCode(); @Override String toString(); static final String TYPE; }
@Test public void toJsonReturnsExpected() { final RetrieveThingDefinitionResponse underTest = RetrieveThingDefinitionResponse.of(TestConstants.Thing.THING_ID, TestConstants.Thing.DEFINITION, TestConstants.EMPTY_DITTO_HEADERS); final JsonObject actualJson = underTest.toJson(FieldType.regularOrSpecial()); assertThat(actualJson).isEqualTo(KNOWN_JSON); }