@@ -0,0 +1,1496 @@
+package org.opentripplanner.profile;%0A%0Aimport junit.framework.TestCase;%0Aimport org.junit.Test;%0Aimport org.opentripplanner.graph_builder.module.FakeGraph;%0Aimport org.opentripplanner.routing.graph.Graph;%0A%0A/**%0A * Test the propagated times store.%0A */%0Apublic class PropagatedTimesStoreTest extends TestCase %7B%0A    /**%0A     * Test that changing the reachability threshold works (i.e. averages are computed properly when destinations are%0A     * only reachable part of the time).%0A     */%0A    @Test%0A    public static void testReachability () throws Exception %7B%0A        ProfileRequest pr = new ProfileRequest();%0A        // old default: no restrictions o%0A        pr.reachabilityThreshold = 0;%0A%0A        Graph g = new Graph();%0A%0A        PropagatedTimesStore pts = new PropagatedTimesStore(g, pr, 1);%0A        // accessible one-third of the time%0A        int%5B%5D%5B%5D times = new int%5B%5D%5B%5D %7B%0A                new int%5B%5D %7B 1 %7D,%0A                new int%5B%5D %7B RaptorWorker.UNREACHED %7D,%0A                new int%5B%5D %7B RaptorWorker.UNREACHED %7D%0A        %7D;%0A%0A        pts.setFromArray(times, PropagatedTimesStore.ConfidenceCalculationMethod.MIN_MAX);%0A%0A        // it is reachable at least 0%25 of the time%0A        assertEquals(1, pts.avgs%5B0%5D);%0A%0A        pr.reachabilityThreshold = 0.5f;%0A        pts = new PropagatedTimesStore(g, pr, 1);%0A        pts.setFromArray(times, PropagatedTimesStore.ConfidenceCalculationMethod.MIN_MAX);%0A%0A        // it is not reachable 50%25 of the time%0A        assertEquals(RaptorWorker.UNREACHED, pts.avgs%5B0%5D);%0A    %7D%0A%7D

add test for reachability thresholds, #2148.