StreamAck implements Jsonifiable { public static StreamAck failure(final String elementId) { return new StreamAck(elementId, Status.FAILURE); } private  StreamAck(final String elementId, final Status status); static StreamAck success(final String elementId); static StreamAck failure(final String elementId); @Override JsonValue toJson(); static StreamAck fromJson(final JsonObject jsonObject); @Override boolean equals(final Object o); @Override int hashCode(); @Override String toString();  }
@Test public void failure() { final StreamAck ack = StreamAck.failure(KNOWN_ELEMENT_ID); assertThat(ack.getElementId()).isEqualTo(KNOWN_ELEMENT_ID); assertThat(ack.getStatus()).isEqualTo(StreamAck.Status.FAILURE); }