GroupObject g1 = createBasicGroupObject("group1");
GroupObject g2 = createBasicGroupObject("group2");
GroupObject g3 = createBasicGroupObject("group3");
// Create some associations.
Artifact2GroupAssociation b2g1 = m_artifact2groupRepository.create(b1, g2);
assert b2g1 != null;
Artifact2GroupAssociation b2g2 = m_artifact2groupRepository.create(b2, g1);
assert b2g2 != null;
Artifact2GroupAssociation b2g3 = m_artifact2groupRepository.create(b1, g3);
assert b2g3 != null;
Artifact2GroupAssociation b2g4 = m_artifact2groupRepository.create(b2, g3);
assert b2g4 != null;
// Do some basic checks on the repositories.
assert m_artifactRepository.get().size() == 2 : "We should have two bundles in our repository; we found " + m_artifactRepository.get().size() + ".";
assert m_groupRepository.get().size() == 3 : "We should have three groups in our repository; we found " + m_groupRepository.get().size() + ".";
assert m_artifact2groupRepository.get().size() == 4 : "We should have four associations in our repository; we found " + m_artifact2groupRepository.get().size() + ".";
assert (b2g4.getLeft().size() == 1) && b2g4.getLeft().contains(b2) : "The left side of the fourth association should be bundle 2.";
assert (b2g4.getRight().size() == 1) && b2g4.getRight().contains(g3) : "The right side of the fourth association should be group 3.";
// Check the wiring: what is wired to what?
List<GroupObject> b1groups = b1.getGroups();
List<GroupObject> b2groups = b2.getGroups();