SudoStreamPids extends AbstractCommand<SudoStreamPids> implements StartStreamRequest, WithIdButActuallyNot { public static SudoStreamPids fromJson(final JsonObject jsonObject, final DittoHeaders dittoHeaders) { final int burst = jsonObject.getValueOrThrow(JSON_BURST); final long timeoutMillis = jsonObject.getValueOrThrow(JSON_TIMEOUT_MILLIS); final EntityIdWithRevision lowerBound = jsonObject.getValue(JSON_LOWER_BOUND).map(LowerBound::new).orElseGet(LowerBound::new); return new SudoStreamPids(burst, timeoutMillis, lowerBound, dittoHeaders); } private  SudoStreamPids(final Integer burst, final Long timeoutMillis, final EntityIdWithRevision lowerBound,
            final DittoHeaders dittoHeaders); static SudoStreamPids of(final Integer burst, final Long timeoutMillis,
            final DittoHeaders dittoHeaders); static SudoStreamPids fromJson(final JsonObject jsonObject,
            final DittoHeaders dittoHeaders); SudoStreamPids withLowerBound(final EntityIdWithRevision lowerBound); EntityIdWithRevision getLowerBound(); boolean hasNonEmptyLowerBound(); @Override int getBurst(); @Override long getTimeoutMillis(); @Override String getTypePrefix(); @Override Category getCategory(); @Override SudoStreamPids setDittoHeaders(final DittoHeaders dittoHeaders); @Override int hashCode(); @Override boolean equals(@Nullable final Object obj); @Override String toString(); @Override JsonPointer getResourcePath(); @Override String getResourceType(); static final String TYPE; }
@Test public void parseWithRegistry() { final SudoStreamPids expected = SudoStreamPids.fromJson(KNOWN_JSON, EMPTY_DITTO_HEADERS); final Jsonifiable parsed = GlobalCommandRegistry.getInstance().parse(KNOWN_JSON, EMPTY_DITTO_HEADERS); assertThat(parsed).isEqualTo(expected); }