I think this code will be easier to understand if we get rid of the `NondeterministicAggregationFunction` interface and mark all of the methods a `@VisibleForTesting` instead.  This will make it clear to the reader that they are only there so the test code can bass a deterministic random.