Prior to this commit the tests had a mixture of JUnit4 and JUnit3 style
of writing. With this commit all tests are using JUnit4 style with
annotations.
With this commit the Spring part has also been polished to use the
updated runner and cleanup the tests to remove the deprecation warnings
due to deprecated annotations.
Using "notifyOf..." naming convention in ApplicationEvents.
HandlingEvents now have a unique sequence number, and CargoUpdater looks events based on that to update the cargo in question.
First version of pessimistic locking of cargo during rerouting.
Cargo is now a facade for aggregate-internal classes Delivery and Projections.
Delivery calculates current voyage, last known location and transport status on the fly.
Introduced a tracking id generator domain service for getting next tracking id, instead of doing it in the cargo repository.
Moved "assignToRoute" into Cargo and removed the service method.
Made Cargo.isMisdirected() persistent and asynchronously updated.
Moved nullSafe method to DomainObjectUtils.
Implemented copy() for value objects.
Methods returning Date on value objects now clone the value to maintain immutability.
Constructor-based injection for domain layer.
@Override annotation on interface implementations, which effectively makes the application Java 6 only.
Introduced CargoHandlingScenarioTest to support refactoring cargo handling, state updating and rerouting.