Extracted a method.
Using a method reference instead of a lambda.
Implement Serializable.
Added an implementation of InputPublisher.