RetrieveAttributesResponse extends AbstractCommandResponse<RetrieveAttributesResponse> implements
        ThingQueryCommandResponse<RetrieveAttributesResponse> { @Deprecated public static RetrieveAttributesResponse of(final String thingId, final Attributes attributes, final DittoHeaders dittoHeaders) { return of(ThingId.of(thingId), attributes, dittoHeaders); } private  RetrieveAttributesResponse(final ThingId thingId, final Attributes attributes,
            final DittoHeaders dittoHeaders); @Deprecated static RetrieveAttributesResponse of(final String thingId, final Attributes attributes,
            final DittoHeaders dittoHeaders); static RetrieveAttributesResponse of(final ThingId thingId, final Attributes attributes,
            final DittoHeaders dittoHeaders); @Deprecated static RetrieveAttributesResponse of(final String thingId, @Nullable final JsonObject jsonObject,
            final DittoHeaders dittoHeaders); static RetrieveAttributesResponse of(final ThingId thingId, @Nullable final JsonObject jsonObject,
            final DittoHeaders dittoHeaders); static RetrieveAttributesResponse fromJson(final String jsonString, final DittoHeaders dittoHeaders); static RetrieveAttributesResponse fromJson(final JsonObject jsonObject,
            final DittoHeaders dittoHeaders); @Override ThingId getThingEntityId(); Attributes getAttributes(); @Override JsonValue getEntity(final JsonSchemaVersion schemaVersion); @Override RetrieveAttributesResponse setEntity(final JsonValue entity); @Override RetrieveAttributesResponse 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(expected = NullPointerException.class) public void tryToCreateInstanceWithNullAttributes() { RetrieveAttributesResponse.of(TestConstants.Thing.THING_ID, null, TestConstants.EMPTY_DITTO_HEADERS); }
@Test public void toJsonReturnsExpected() { final RetrieveAttributesResponse underTest = RetrieveAttributesResponse.of(TestConstants.Thing.THING_ID, TestConstants.Thing.ATTRIBUTES, TestConstants.EMPTY_DITTO_HEADERS); final JsonObject actualJson = underTest.toJson(FieldType.regularOrSpecial()); assertThat(actualJson).isEqualTo(KNOWN_JSON); }