Shutdown extends CommonCommand<Shutdown> { @Override public String toString() { return getClass().getSimpleName() + " [" + super.toString() + ", reason=" + reason + "]"; } private  Shutdown(final ShutdownReason theReason, final DittoHeaders dittoHeaders); static Shutdown getInstance(final ShutdownReason shutdownReason, final DittoHeaders dittoHeaders); static Shutdown fromJson(final JsonObject jsonObject, final DittoHeaders dittoHeaders); ShutdownReason getReason(); @Override Shutdown setDittoHeaders(final DittoHeaders dittoHeaders); @Override boolean equals(final Object o); @Override int hashCode(); @Override String toString(); static final String TYPE; }
@Test public void toStringContainsExpected() { assertThat(underTest.toString()) .contains(underTest.getClass().getSimpleName()) .contains(underTest.getType()) .contains(underTest.getDittoHeaders().toString()) .contains(underTest.getCategory().toString()) .contains(knownShutdownReason.toString()); }