@Test void ofShouldThrowOnNegative() { assertThatThrownBy(() -> NullableMessageSequenceNumber.of(-1)).isInstanceOf(IllegalArgumentException.class); }
public static NullableMessageSequenceNumber of(int msn) { return new NullableMessageSequenceNumber(Optional.of(MessageSequenceNumber.of(msn))); }
NullableMessageSequenceNumber { public static NullableMessageSequenceNumber of(int msn) { return new NullableMessageSequenceNumber(Optional.of(MessageSequenceNumber.of(msn))); } }
NullableMessageSequenceNumber { public static NullableMessageSequenceNumber of(int msn) { return new NullableMessageSequenceNumber(Optional.of(MessageSequenceNumber.of(msn))); } private  NullableMessageSequenceNumber(Optional<MessageSequenceNumber> msn); }
NullableMessageSequenceNumber { public static NullableMessageSequenceNumber of(int msn) { return new NullableMessageSequenceNumber(Optional.of(MessageSequenceNumber.of(msn))); } private  NullableMessageSequenceNumber(Optional<MessageSequenceNumber> msn); static NullableMessageSequenceNumber noMessage(); static NullableMessageSequenceNumber of(int msn); void ifPresent(Consumer<MessageSequenceNumber> consumer); T fold(HandleNoMessage<T> handleNoMessage, HandleMessage<T> handleMessage); Optional<Integer> asInt(); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString(); }
NullableMessageSequenceNumber { public static NullableMessageSequenceNumber of(int msn) { return new NullableMessageSequenceNumber(Optional.of(MessageSequenceNumber.of(msn))); } private  NullableMessageSequenceNumber(Optional<MessageSequenceNumber> msn); static NullableMessageSequenceNumber noMessage(); static NullableMessageSequenceNumber of(int msn); void ifPresent(Consumer<MessageSequenceNumber> consumer); T fold(HandleNoMessage<T> handleNoMessage, HandleMessage<T> handleMessage); Optional<Integer> asInt(); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString();  }