svoid test_ProbabilisticDistanceBasedLookup() { new L> out; new ProbabilisticScheduler scheduler; NavigableMap map = listToKeyAndValue_treeMap(ll( 1.0, 2.0, 3.0, 4.0, 5.0 )); ProbabilisticDistanceBasedLookup lookup = new(scheduler, map, x -> out.add(withProbability(scheduler.current(), x)), 3.5); lookup.run(); scheduler.run(50); assertEqualsVerbose(str(out), str(ll( withProbability(.67, 3.0), withProbability(.67, 4.0), withProbability(.4, 2.0), withProbability(.4, 5.0), withProbability(.29, 1.0)))); }