RetrieveFeatureDefinitionResponse extends AbstractCommandResponse<RetrieveFeatureDefinitionResponse> implements ThingQueryCommandResponse<RetrieveFeatureDefinitionResponse> { @Deprecated public static RetrieveFeatureDefinitionResponse of(final String thingId, final String featureId, final FeatureDefinition definition, final DittoHeaders dittoHeaders) { return of(ThingId.of(thingId), featureId, definition, dittoHeaders); } private  RetrieveFeatureDefinitionResponse(final ThingId thingId,
            final String featureId,
            final JsonArray definition,
            final DittoHeaders dittoHeaders); @Deprecated static RetrieveFeatureDefinitionResponse of(final String thingId,
            final String featureId,
            final FeatureDefinition definition,
            final DittoHeaders dittoHeaders); static RetrieveFeatureDefinitionResponse of(final ThingId thingId,
            final String featureId,
            final FeatureDefinition definition,
            final DittoHeaders dittoHeaders); @Deprecated static RetrieveFeatureDefinitionResponse of(final String thingId,
            final String featureId,
            final JsonArray definitionJsonArray,
            final DittoHeaders dittoHeaders); static RetrieveFeatureDefinitionResponse of(final ThingId thingId,
            final String featureId,
            final JsonArray definitionJsonArray,
            final DittoHeaders dittoHeaders); static RetrieveFeatureDefinitionResponse fromJson(final String jsonString, final DittoHeaders dittoHeaders); static RetrieveFeatureDefinitionResponse fromJson(final JsonObject jsonObject,
            final DittoHeaders dittoHeaders); @Override ThingId getThingEntityId(); String getFeatureId(); FeatureDefinition getDefinition(); @Override JsonValue getEntity(final JsonSchemaVersion schemaVersion); @Override RetrieveFeatureDefinitionResponse setEntity(final JsonValue entity); @Override RetrieveFeatureDefinitionResponse 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 tryToCreateInstanceWithNullFeatureDefinition() { assertThatNullPointerException() .isThrownBy(() -> RetrieveFeatureDefinitionResponse.of(TestConstants.Thing.THING_ID, TestConstants.Feature.FLUX_CAPACITOR_ID, (FeatureDefinition) null, TestConstants.EMPTY_DITTO_HEADERS)) .withMessage("The %s must not be null!", "Definition") .withNoCause(); }