@Test public void testToString() { final String matchingSerializedRegex = "StreamConnection\\[" + "creationDateTime=[0-9]{4}\\-[0-9]{2}\\-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}.\\d+Z, " + "streamConnectionId=\\S+ sequence=\\d+, connectionState=[A-Z]+]"; final String serializedStreamConnection = streamConnection.toString(); assertThat(serializedStreamConnection.matches(matchingSerializedRegex)).isTrue(); }
@Override public String toString() { return new StringJoiner(", ", StreamConnection.class.getSimpleName() + "[", "]") .add("creationDateTime=" + creationDateTime) .add("streamConnectionId=" + streamConnectionId) .add("sequence=" + sequence) .add("connectionState=" + connectionState) .toString(); }
StreamConnection implements Closeable { @Override public String toString() { return new StringJoiner(", ", StreamConnection.class.getSimpleName() + "[", "]") .add("creationDateTime=" + creationDateTime) .add("streamConnectionId=" + streamConnectionId) .add("sequence=" + sequence) .add("connectionState=" + connectionState) .toString(); } }
StreamConnection implements Closeable { @Override public String toString() { return new StringJoiner(", ", StreamConnection.class.getSimpleName() + "[", "]") .add("creationDateTime=" + creationDateTime) .add("streamConnectionId=" + streamConnectionId) .add("sequence=" + sequence) .add("connectionState=" + connectionState) .toString(); } StreamConnection(final InterledgerAddress receiverAddress, final SharedSecret sharedSecret);  StreamConnection(final StreamConnectionId streamConnectionId); }
StreamConnection implements Closeable { @Override public String toString() { return new StringJoiner(", ", StreamConnection.class.getSimpleName() + "[", "]") .add("creationDateTime=" + creationDateTime) .add("streamConnectionId=" + streamConnectionId) .add("sequence=" + sequence) .add("connectionState=" + connectionState) .toString(); } StreamConnection(final InterledgerAddress receiverAddress, final SharedSecret sharedSecret);  StreamConnection(final StreamConnectionId streamConnectionId); UnsignedLong nextSequence(); Instant getCreationDateTime(); void transitionConnectionState(); StreamConnectionState getConnectionState(); StreamConnectionId getStreamConnectionId(); void closeConnection(); boolean isClosed(); @Override boolean equals(Object obj); @Override int hashCode(); @Override String toString(); @Override void close(); }
StreamConnection implements Closeable { @Override public String toString() { return new StringJoiner(", ", StreamConnection.class.getSimpleName() + "[", "]") .add("creationDateTime=" + creationDateTime) .add("streamConnectionId=" + streamConnectionId) .add("sequence=" + sequence) .add("connectionState=" + connectionState) .toString(); } StreamConnection(final InterledgerAddress receiverAddress, final SharedSecret sharedSecret);  StreamConnection(final StreamConnectionId streamConnectionId); UnsignedLong nextSequence(); Instant getCreationDateTime(); void transitionConnectionState(); StreamConnectionState getConnectionState(); StreamConnectionId getStreamConnectionId(); void closeConnection(); boolean isClosed(); @Override boolean equals(Object obj); @Override int hashCode(); @Override String toString(); @Override void close(); static final UnsignedLong MAX_FRAMES_PER_CONNECTION; }