BusStop extends AbstractBusPrimitive<BusNetwork> { @Override @Pure public GeoLocation getGeoLocation() { final GeoLocationPoint pt = getGeoPosition(); if (pt == null) { return new GeoLocationNowhere(getUUID()); } return pt; } 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 testGetGeoLocation() { assertNull(this.stop.getGeoPosition()); this.stop.setPosition(new GeoLocationPoint(34., 35.)); GeoLocation p = this.stop.getGeoLocation(); assertNotNull(p); assertTrue(p instanceof GeoLocationPoint); assertEpsilonEquals(34f, ((GeoLocationPoint)p).getX()); assertEpsilonEquals(35f, ((GeoLocationPoint)p).getY()); }