@Test
public void testFrequencyLabelByStops() {
Trip tripA = new Trip();
tripA.setId(_tripEntryA.getId());
Frequency frequency = new Frequency();
frequency.setTrip(tripA);
frequency.setStartTime(time(7, 00));
frequency.setEndTime(time(10, 00));
frequency.setHeadwaySecs(600);
frequency.setLabelOnly(3);
Mockito.when(_dao.getAllFrequencies()).thenReturn(Arrays.asList(frequency));
_graph.initialize();
_factory.processFrequencies(_graph);
FrequencyEntry frequencyEntry = _tripEntryA.getFrequencyLabel();
assertNotNull(frequencyEntry);
assertEquals(frequency.getStartTime(), frequencyEntry.getStartTime());
assertEquals(frequency.getEndTime(), frequencyEntry.getEndTime());
assertEquals(frequency.getHeadwaySecs(), frequencyEntry.getHeadwaySecs());
assertSame(frequencyEntry, _tripEntryB.getFrequencyLabel());
assertSame(frequencyEntry, _tripEntryC.getFrequencyLabel());
assertNull(_tripEntryD.getFrequencyLabel());
}