List<Box> boxes = (List<Box>) bag.readPropertyDirectly(Bag.BOXES_PROPERTY);
assertNotNull(boxes);
assertFalse(((ValueHolder) boxes).isFault());
assertEquals(2, boxes.size());
Box big = null;
List<String> names = new ArrayList<String>();
for (Box box : boxes) {
assertEquals(PersistenceState.COMMITTED, box.getPersistenceState());
names.add(box.getName());
if (box.getName().equals("big")) {
big = box;
}
}
assertTrue(names.contains("big"));
assertTrue(names.contains("small"));
List<Ball> balls = (List<Ball>) big.readPropertyDirectly(Box.BALLS_PROPERTY);
assertNotNull(balls);
assertFalse(((ValueHolder) balls).isFault());
assertEquals(2, balls.size());
List<Integer> volumes = new ArrayList<Integer>();
for (Ball ball : balls) {