public void test04() {
StopEntryImpl fromStop = stop("stopA", 47.0, -122.0);
StopEntryImpl toStop = stop("stopB", 47.0, -122.0);
TripEntryImpl trip1A = trip("1A", "sA");
TripEntryImpl trip1B = trip("1B", "sA");
TripEntryImpl trip1C = trip("1C", "sA");
TripEntryImpl trip1D = trip("1D", "sA");
stopTime(0, fromStop, trip1A, time(10, 00), time(10, 05), 0.0);
stopTime(1, fromStop, trip1B, time(10, 10), time(10, 15), 0.0);
stopTime(2, fromStop, trip1C, time(10, 20), time(10, 25), 0.0);
stopTime(3, fromStop, trip1D, time(10, 30), time(10, 35), 0.0);
stopTime(4, toStop, trip1A, time(10, 10), time(10, 15), 0.0);
stopTime(5, toStop, trip1B, time(10, 20), time(10, 25), 0.0);
stopTime(6, toStop, trip1C, time(10, 30), time(10, 35), 0.0);
stopTime(7, toStop, trip1D, time(10, 40), time(10, 45), 0.0);
BlockConfigurationEntry b1A = linkBlockTrips("b1A", trip1A);
BlockConfigurationEntry b1B = linkBlockTrips("b1B", trip1B);
BlockConfigurationEntry b1C = linkBlockTrips("b1C", trip1C);
BlockConfigurationEntry b1D = linkBlockTrips("b1D", trip1D);
BlockSequenceIndex index1 = createBlockSequenceIndex(b1A, b1B, b1C, b1D);
BlockStopSequenceIndex fromIndex1 = new BlockStopSequenceIndex(index1, 0);
BlockStopSequenceIndex toIndex1 = new BlockStopSequenceIndex(index1, 1);
Pair<BlockStopSequenceIndex> indexPair1 = Tuples.pair(fromIndex1, toIndex1);
TripEntryImpl trip2A = trip("2A", "sA");
TripEntryImpl trip2B = trip("2B", "sA");
TripEntryImpl trip2C = trip("2C", "sA");
TripEntryImpl trip2D = trip("2D", "sA");
stopTime(0, fromStop, trip2A, time(10, 07), time(10, 07), 0.0);
stopTime(1, fromStop, trip2B, time(10, 17), time(10, 17), 0.0);
stopTime(2, fromStop, trip2C, time(10, 27), time(10, 27), 0.0);
stopTime(3, fromStop, trip2D, time(10, 37), time(10, 37), 0.0);
stopTime(4, toStop, trip2A, time(10, 17), time(10, 17), 0.0);
stopTime(5, toStop, trip2B, time(10, 27), time(10, 27), 0.0);
stopTime(6, toStop, trip2C, time(10, 37), time(10, 37), 0.0);
stopTime(7, toStop, trip2D, time(10, 47), time(10, 47), 0.0);
BlockConfigurationEntry b2A = linkBlockTrips("bA", trip2A);
BlockConfigurationEntry b2B = linkBlockTrips("bB", trip2B);
BlockConfigurationEntry b2C = linkBlockTrips("bC", trip2C);
BlockConfigurationEntry b2D = linkBlockTrips("bD", trip2D);
BlockSequenceIndex index2 = createBlockSequenceIndex(b2A, b2B, b2C, b2D);
BlockStopSequenceIndex fromIndex2 = new BlockStopSequenceIndex(index2, 0);
BlockStopSequenceIndex toIndex2 = new BlockStopSequenceIndex(index2, 1);
Pair<BlockStopSequenceIndex> indexPair2 = Tuples.pair(fromIndex2, toIndex2);
List<Pair<BlockStopSequenceIndex>> indices = new ArrayList<Pair<BlockStopSequenceIndex>>();
indices.add(indexPair1);
indices.add(indexPair2);
Mockito.when(
_blockIndexService.getBlockSequenceIndicesBetweenStops(fromStop, toStop)).thenReturn(
indices);
TripEntryImpl tripF = trip("freq", "sA");
stopTime(0, fromStop, tripF, time(10, 00), time(10, 00), 0.0);
stopTime(4, toStop, tripF, time(10, 05), time(10, 05), 0.0);
FrequencyEntry frequency = new FrequencyEntryImpl(time(10, 30),