try
{
// --------------------------------------------------------------------------------
// Create and store an object graph in the repository
// --------------------------------------------------------------------------------
Odyssey odyssey = new Odyssey();
odyssey.setPath("/odesseyToMars");
odyssey.setGoingTo(Planet.MARS);
odyssey.setStartingFrom(Planet.EARTH);
odyssey.setStops(getStops());
ocm.insert(odyssey);
Odyssey fbOdessey = (Odyssey)ocm.getObject("/odesseyToMars");
assertTrue("Fetched back Enum did not match the saved data", fbOdessey.getGoingTo() == Planet.MARS);
assertTrue("Fetched back Enum did not match the saved data", fbOdessey.getStartingFrom() == Planet.EARTH);
assertTrue("Fetched back Enum did not match the saved Enum Collection Size", fbOdessey.getStops().size() == odyssey.getStops().size());
List<Planet> stops = getStops();
List<Planet> fbStops = fbOdessey.getStops();
for (Planet aStop : stops){
assertContains("Fetched back list did not contain :" + aStop.toString(), aStop, fbStops);
log.info("Contains Enum : " + aStop.toString());
}
}