pm.addTag("test-tag1", "Department.name", "attribute", "bob"); pm.addTag("test-tag1", "Department.company", "reference", "bob"); pm.addTag("test-tag1", "Department.employees", "collection", "bob");
pm.addTag("tag1", "Department.name", "attribute", "bob"); pm.addTag("tag1", "Department.company", "reference", "bob"); pm.addTag("tag1", "Department.employees", "collection", "bob");
    public void testGetTags() throws Exception {        InputStream is =            getClass().getClassLoader().getResourceAsStream("ProfileManagerBindingTestNewIDs.xml");        BufferedReader reader = new BufferedReader(new InputStreamReader(is));        ProfileManagerBinding.unmarshal(reader, pm, os, new PkQueryIdUpgrader());        pm.addTag("test-tag1", "Department.name", "attribute", "bob");        pm.addTag("test-tag1", "Department.company", "reference", "bob");        pm.addTag("test-tag1", "Department.employees", "collection", "bob");        pm.addTag("test-tag2", "Department.name", "attribute", "bob");        pm.addTag("test-tag2", "Department.company", "reference", "bob");        pm.addTag("test-tag2", "Department.employees", "collection", "bob");        pm.addTag("test-tag1", "Department.name", "attribute", "sally");        pm.addTag("test-tag1", "Department.company", "reference", "sally");        pm.addTag("test-tag1", "Department.employees", "collection", "sally");        pm.addTag("test-tag3", "Department.name", "attribute", "sally");        pm.addTag("test-tag3", "Department.company", "reference", "sally");        pm.addTag("test-tag3", "Department.employees", "collection", "sally");        List allTags = pm.getTags(null, null, null, null);        assertEquals(12, allTags.size());        List nameTags = pm.getTags(null, "Department.name", "attribute", "bob");        assertEquals(2, nameTags.size());        List bobAttributeTag1 = pm.getTags("test-tag1", null, "attribute", "bob");        assertEquals(1, bobAttributeTag1.size());        List bobTag1DeptName = pm.getTags("test-tag1", "Department.name", null, "bob");        assertEquals(1, bobTag1DeptName.size());        List allNameAttributeTag1s = pm.getTags("test-tag1", "Department.name", "attribute", null);        assertEquals(2, allNameAttributeTag1s.size());    }