BusStop extends AbstractBusPrimitive<BusNetwork> { @Pure public Iterable<BusItineraryHalt> getBindedBusHalts() { if (this.halts == null) { return Collections.emptyList(); } return Collections.unmodifiableCollection(this.halts); } BusStop(String name);  BusStop(UUID id, String name);  BusStop(String name, AttributeCollection attributeProvider);  BusStop(UUID id, String name, AttributeCollection attributeProvider);  BusStop(String name, GeoLocationPoint position);  BusStop(UUID id, String name, GeoLocationPoint position);  BusStop(String name, GeoLocationPoint position, AttributeCollection attributeProvider);  BusStop(UUID id, String name, GeoLocationPoint position, AttributeCollection attributeProvider); @Override @Pure void toJson(JsonBuffer buffer); @Pure static String getFirstFreeBusStopName(BusNetwork busNetwork); @Override boolean setContainer(BusNetwork container); @Override @Pure BusNetwork getBusNetwork(); @Override void setName(String name); void setPosition(GeoLocationPoint position); @Pure GeoLocationPoint getGeoPosition(); @Pure Point2d getPosition2D(); @Override void rebuild(boolean fireEvents); @Override Shape2d<?> getShape(); @Override @Pure GeoLocation getGeoLocation(); @Pure double distance(double x, double y); @Pure double distance(BusStop stop); @Pure double distance(BusItineraryHalt halt); @Pure double distance(Point2D<?, ?> point); @Pure double distance(GeoLocationPoint point); @Pure boolean insideBusHub(); @Pure Iterable<BusHub> busHubs(); @Pure Iterator<BusHub> busHubIterator(); @Pure boolean isBusHaltBinded(); @Override @Pure int indexInParent(); @Pure Iterable<BusItineraryHalt> getBindedBusHalts();  }
@Test public void testGetBindedBusHalts() { BusItinerary itinerary = new BusItinerary(); BusItineraryHalt halt = new BusItineraryHalt(itinerary, "HALT", BusItineraryHaltType.STOP_ON_DEMAND); Iterator<BusItineraryHalt> iterator; iterator = this.stop.getBindedBusHalts().iterator(); assertFalse(iterator.hasNext()); this.stop.addBusHalt(halt); iterator = this.stop.getBindedBusHalts().iterator(); assertTrue(iterator.hasNext()); assertSame(halt, iterator.next()); assertFalse(iterator.hasNext()); this.stop.removeBusHalt(halt); iterator = this.stop.getBindedBusHalts().iterator(); assertFalse(iterator.hasNext()); }