StatusInfo implements Jsonifiable<JsonObject> { public static StatusInfo fromJson(final String jsonString) { return fromJson(JsonFactory.newObject(jsonString)); } private  StatusInfo(final Status status, final Collection<StatusDetailMessage> details,
            final Collection<StatusInfo> children, @Nullable final String label); static StatusInfo unknown(); static StatusInfo fromStatus(final Status status); static StatusInfo fromStatus(final Status status, @Nullable final String message); static StatusInfo fromStatus(final Status status, final Collection<StatusDetailMessage> details); static StatusInfo fromDetail(final StatusDetailMessage detail); static StatusInfo fromDetails(final Collection<StatusDetailMessage> details); static StatusInfo composite(final List<StatusInfo> children); static StatusInfo composite(final Map<String, StatusInfo> labeledChildren); static StatusInfo fromJson(final String jsonString); static StatusInfo fromJson(final JsonObject jsonObject); Status getStatus(); List<StatusDetailMessage> getDetails(); List<StatusInfo> getChildren(); Optional<String> getLabel(); StatusInfo label(@Nullable final String label); boolean isComposite(); StatusInfo addDetail(final StatusDetailMessage detail); boolean isHealthy(); @Override JsonObject toJson(); @Override int hashCode(); @Override boolean equals(final Object obj); @Override String toString(); static final JsonFieldDefinition<String> JSON_KEY_LABEL; static final JsonFieldDefinition<String> JSON_KEY_STATUS; static final JsonFieldDefinition<JsonArray> JSON_KEY_DETAILS; static final JsonFieldDefinition<JsonArray> JSON_KEY_CHILDREN; }
@Test public void fromValidJsonObject() { final StatusInfo actual = StatusInfo.fromJson(KNOWN_COMPOSITE_COMPOSITE_STATUS_INFO_JSON); assertThat(actual).isEqualTo(KNOWN_COMPOSITE_COMPOSITE_STATUS_INFO); }