code: private <T> Consumer<T> chainConsumers(final Consumer<T> currentConsumer, final Consumer<T> consumer) {
          if (currentConsumer != null) {
              return currentConsumer.andThen(consumer);
          }
  
          return consumer;
      }
docs: Helper function to chain consumers together or return the new one if the current consumer
  isn't set.
  
  @param currentConsumer the current consumer, which may be null
  @param consumer the new consumer to chain with the current one.
  @param <T>
  @return the chained consumer (or the new consumer if there previously wasn't one around)