@Test public void testConstruction() { TrackingId trackingId = new TrackingId("XYZ"); Date arrivalDeadline = DateUtil.toDate("2009-03-13"); RouteSpecification routeSpecification = new RouteSpecification( SampleLocations.STOCKHOLM, SampleLocations.MELBOURNE, arrivalDeadline); Cargo cargo = new Cargo(trackingId, routeSpecification); assertEquals(RoutingStatus.NOT_ROUTED, cargo.getDelivery() .getRoutingStatus()); assertEquals(TransportStatus.NOT_RECEIVED, cargo.getDelivery() .getTransportStatus()); assertEquals(Location.UNKNOWN, cargo.getDelivery() .getLastKnownLocation()); assertEquals(Voyage.NONE, cargo.getDelivery().getCurrentVoyage()); }
public Delivery getDelivery() { return delivery; }
Cargo implements Serializable { public Delivery getDelivery() { return delivery; } }
Cargo implements Serializable { public Delivery getDelivery() { return delivery; } Cargo();  Cargo(TrackingId trackingId, RouteSpecification routeSpecification); }
Cargo implements Serializable { public Delivery getDelivery() { return delivery; } Cargo();  Cargo(TrackingId trackingId, RouteSpecification routeSpecification); TrackingId getTrackingId(); void setOrigin(Location origin); Location getOrigin(); RouteSpecification getRouteSpecification(); Delivery getDelivery(); Itinerary getItinerary(); void specifyNewRoute(RouteSpecification routeSpecification); void assignToRoute(Itinerary itinerary); void deriveDeliveryProgress(HandlingHistory handlingHistory); @Override boolean equals(Object object); @Override int hashCode(); @Override String toString(); }
Cargo implements Serializable { public Delivery getDelivery() { return delivery; } Cargo();  Cargo(TrackingId trackingId, RouteSpecification routeSpecification); TrackingId getTrackingId(); void setOrigin(Location origin); Location getOrigin(); RouteSpecification getRouteSpecification(); Delivery getDelivery(); Itinerary getItinerary(); void specifyNewRoute(RouteSpecification routeSpecification); void assignToRoute(Itinerary itinerary); void deriveDeliveryProgress(HandlingHistory handlingHistory); @Override boolean equals(Object object); @Override int hashCode(); @Override String toString();  }