// Create dummy TimetableResolver
TimetableResolver resolver = new TimetableResolver();
// Mock TimetableSnapshotSource to return dummy TimetableResolver
TimetableSnapshotSource timetableSnapshotSource = mock(TimetableSnapshotSource.class);
when(timetableSnapshotSource.getTimetableSnapshot()).thenReturn(resolver);
timetableSnapshotSource.getTimetableSnapshot().update(
thirdTripPattern, tripUpdate, "Ferry", timeZone, serviceDate);
// Further graph initialization
graph.putService(CalendarServiceData.class, calendarServiceData);
graph.putService(FareService.class, fareServiceStub);