SudoRetrieveThing extends AbstractCommand<SudoRetrieveThing> implements SudoCommand<SudoRetrieveThing> { public static SudoRetrieveThing of(final ThingId thingId, final DittoHeaders dittoHeaders) { return of(thingId, null, dittoHeaders); } private  SudoRetrieveThing(final ThingId thingId,
            @Nullable final JsonFieldSelector selectedFields,
            final DittoHeaders dittoHeaders,
            final boolean useOriginalSchemaVersion); static SudoRetrieveThing of(final ThingId thingId, final DittoHeaders dittoHeaders); static SudoRetrieveThing of(final ThingId thingId, @Nullable final JsonFieldSelector selectedFields,
            final DittoHeaders dittoHeaders); static SudoRetrieveThing withOriginalSchemaVersion(final ThingId thingId,
            @Nullable final JsonFieldSelector selectedFields, final DittoHeaders dittoHeaders); static SudoRetrieveThing withOriginalSchemaVersion(final ThingId thingId,
            final DittoHeaders dittoHeaders); static SudoRetrieveThing fromJson(final String jsonString, final DittoHeaders dittoHeaders); static SudoRetrieveThing fromJson(final JsonObject jsonObject, final DittoHeaders dittoHeaders); @Override String getId(); @Override EntityId getEntityId(); boolean useOriginalSchemaVersion(); Optional<JsonFieldSelector> getSelectedFields(); @Override Category getCategory(); @Override SudoRetrieveThing setDittoHeaders(final DittoHeaders dittoHeaders); @Override boolean equals(@Nullable final Object o); @Override int hashCode(); @Override String toString(); static final String NAME; static final String TYPE; }
@Test public void toJsonReturnsExpected() { final SudoRetrieveThing underTest = SudoRetrieveThing.of(THING_ID, EMPTY_DITTO_HEADERS); final JsonObject actualJson = underTest.toJson(FieldType.regularOrSpecial()); assertThat(actualJson).isEqualTo(KNOWN_JSON); }