test_class.file: siri/gtfs_reader/src/test/java/il/org/hasadna/siri_client/gtfs/crud/StopTimesCrudTest.java
test_class.identifier: StopTimesCrudTest
test_case.body: @Test
  
  	public void testgetRelevantStopTimeItems() throws IOException {
  		// Prepare
  		String tripIdA = "tripIdA";
  		String tripIdB = "tripIdB";
  		String arrivalTime = "";
  		String departureTime = "";
  		int stopId = 0;
  		int pickupType = 0;
  		int dropOffType = 0;
  		int shapeDistTraveled = 0;
  
  		StopTime stopTime1 = new BaseStopTime(tripIdB, arrivalTime, departureTime, stopId, 1, pickupType, dropOffType,
  				shapeDistTraveled);
  		StopTime stopTime2 = new BaseStopTime(tripIdA, arrivalTime, departureTime, stopId, 2, pickupType, dropOffType,
  				shapeDistTraveled);
  		StopTime stopTime3 = new BaseStopTime(tripIdA, arrivalTime, departureTime, stopId, 3, pickupType, dropOffType,
  				shapeDistTraveled);
  
  		StopTimesCrud stopTimesCrudStub = new StopTimesCrud(
  				Paths.get("src/test/resources/siri_client/gtfs/cruds/min_stop_times.txt")) {
  			@Override
  			public Stream<StopTime> ReadAll() throws IOException {
  
  				return Arrays.asList(stopTime1, stopTime2, stopTime3).stream();
  			}
  
  		};
  
  		// Expected - get last stop time of trip A and last stop time of trip B
  		Set<StopTime> expected = new HashSet<>(Arrays.asList(stopTime1, stopTime3));
  		// Execute
  		Set<StopTime> actual = stopTimesCrudStub.getRelevantStopTimeItems().collect(Collectors.toSet());
  		// Test
  		assertEquals(expected, actual);
  
  	}
test_case.class_method_signature: StopTimesCrudTest.testgetRelevantStopTimeItems()
test_case.full_signature: @Test public void testgetRelevantStopTimeItems()
test_case.identifier: testgetRelevantStopTimeItems
test_case.invocations: get stream asList asList collect getRelevantStopTimeItems toSet assertEquals
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testgetRelevantStopTimeItems()
focal_class.file: siri/gtfs_reader/src/main/java/il/org/hasadna/siri_client/gtfs/crud/StopTimesCrud.java
focal_class.identifier: StopTimesCrud
focal_class.class_method_signature: StopTimesCrud.StopTimesCrud(Path file)
focal_class.full_signature: public  StopTimesCrud(Path file)
focal_class.identifier: StopTimesCrud
focal_class.modifiers: public
focal_class.parameters: (Path file)
focal_class.signature:  StopTimesCrud(Path file)
focal_class.class_method_signature: StopTimesCrud.parseLine(String string)
focal_class.full_signature: @Override StopTime parseLine(String string)
focal_class.identifier: parseLine
focal_class.modifiers: @Override
focal_class.parameters: (String string)
focal_class.return: StopTime
focal_class.signature: StopTime parseLine(String string)
focal_class.class_method_signature: StopTimesCrud.getRelevantStopTimeItems()
focal_class.full_signature: public Stream<StopTime> getRelevantStopTimeItems()
focal_class.identifier: getRelevantStopTimeItems
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: Stream<StopTime>
focal_class.signature: Stream<StopTime> getRelevantStopTimeItems()
focal_class.superclass: extends AbstractFileCrud<StopTime>
focal_method.body: public Stream<StopTime> getRelevantStopTimeItems() throws IOException {
  		return ReadAll().collect(Collectors.groupingBy(StopTime::getTripId, Collectors
  				.collectingAndThen(Collectors.maxBy(Comparator.comparing(StopTime::getStopSequence)), Optional::get)))
  				.values()
  				.stream();
  	}
focal_method.class_method_signature: StopTimesCrud.getRelevantStopTimeItems()
focal_method.full_signature: public Stream<StopTime> getRelevantStopTimeItems()
focal_method.identifier: getRelevantStopTimeItems
focal_method.invocations: stream values collect ReadAll groupingBy collectingAndThen maxBy comparing
focal_method.modifiers: public
focal_method.parameters: ()
focal_method.return: Stream<StopTime>
focal_method.signature: Stream<StopTime> getRelevantStopTimeItems()