GenerateNarrativesTask implements Runnable { public void generateShapePointNarratives(NarrativeProviderImpl provider) { List<AgencyAndId> shapeIds = _gtfsDao.getAllShapeIds(); int shapeSize = shapeIds.size(); _log.info("shapes to process=" + shapeSize); int logInterval = LoggingIntervalUtil.getAppropriateLoggingInterval(shapeSize) * 10; int index = 0; for (AgencyAndId shapeId : shapeIds) { if (index % logInterval == 0) _log.info("shapes=" + index); index++; ShapePoints shapePoints = _shapePointsHelper.getShapePointsForShapeId(shapeId); provider.setShapePointsForId(shapeId, shapePoints); } }  @Autowired void setBundle(FederatedTransitDataBundle bundle); @Autowired void setGtfsDao(GtfsRelationalDao gtfsDao); @Autowired void setTransitGraphDao(TransitGraphDao transitGraphDao); @Autowired void setBlockIndexService(BlockIndexService blockIndexService); @Autowired void setModifications(Modifications modifications); @Autowired void setShapePointHelper(ShapePointHelper shapePointHelper); @Autowired void setUniqueService(UniqueService uniqueService); @Autowired void setRefreshService(RefreshService refreshService); void setStopDirectionStandardDeviationThreshold(
      double stopDirectionStandardDeviationThreshold); @Override void run(); void generateAgencyNarratives(NarrativeProviderImpl provider); void generateRouteNarratives(NarrativeProviderImpl provider); void generateShapePointNarratives(NarrativeProviderImpl provider); void generateStopNarratives(NarrativeProviderImpl provider); void generateTripNarratives(NarrativeProviderImpl provider);  }
@Test public void testGenerateShapePointNarratives() { AgencyAndId shapeId = aid("shapeId"); ShapePoints points = new ShapePoints(); Mockito.when(_shapePointHelper.getShapePointsForShapeId(shapeId)).thenReturn( points); Mockito.when(_gtfsDao.getAllShapeIds()).thenReturn(Arrays.asList(shapeId)); _task.generateShapePointNarratives(_provider); Mockito.verify(_shapePointHelper).getShapePointsForShapeId(shapeId); assertSame(points, _provider.getShapePointsForId(shapeId)); }