Spine allows having an Optional as the second argument of Pair but the only way to create it is call Pair.withNullable() which allows the second argument to be null, but there is no option to create a Pair if I have a message that is already wrapped in Optional.
I see the method signature like this:
public static <M extends Message, O extends Optional<? extends Message>> Pair<M, O> withOptional(M a, O b)
The resulting API will be:
Optional<Message> optional = Optional.of(...);
Pair<Message, Optional<Message>> = Pair.withOptional(message, optional);