The final result is computed in the finisher() method. In this case, we simply return Function.identity() since the accumulator doesn't require any further transformation:
@Override
public Function<Map<Boolean, List<Melon>>,
Map<Boolean, List<Melon>>> finisher() {
return Function.identity();
}