numberOfReferences = pm.getNumberOfReferences(channel.getChannelID());
refs.add(ref8); refs.add(ref9); refs.add(ref10); refs.add(ref11); refs.add(ref12); refs.add(ref13);
   public void testGetNumberOfReferences() throws Exception   {      doSetup(false);            Channel channel = new SimpleChannel(0, ms);            Message[] m = createMessages(10);            MessageReference ref1 = ms.reference(m[0]);      MessageReference ref2 = ms.reference(m[1]);      MessageReference ref3 = ms.reference(m[2]);      MessageReference ref4 = ms.reference(m[3]);      MessageReference ref5 = ms.reference(m[4]);      MessageReference ref6 = ms.reference(m[5]);      MessageReference ref7 = ms.reference(m[6]);      MessageReference ref8 = ms.reference(m[7]);      MessageReference ref9 = ms.reference(m[8]);      MessageReference ref10 = ms.reference(m[9]);            pm.addReference(channel.getChannelID(), ref1, null);      pm.addReference(channel.getChannelID(), ref2, null);      pm.addReference(channel.getChannelID(), ref3, null);      pm.addReference(channel.getChannelID(), ref4, null);      pm.addReference(channel.getChannelID(), ref5, null);      pm.addReference(channel.getChannelID(), ref6, null);      pm.addReference(channel.getChannelID(), ref7, null);      pm.addReference(channel.getChannelID(), ref8, null);      pm.addReference(channel.getChannelID(), ref9, null);      pm.addReference(channel.getChannelID(), ref10, null);            List refIds = getReferenceIds(channel.getChannelID());      assertNotNull(refIds);      assertEquals(10, refIds.size());      assertTrue(refIds.contains(new Long(ref1.getMessageID())));      assertTrue(refIds.contains(new Long(ref2.getMessageID())));      assertTrue(refIds.contains(new Long(ref3.getMessageID())));      assertTrue(refIds.contains(new Long(ref4.getMessageID())));      assertTrue(refIds.contains(new Long(ref5.getMessageID())));      assertTrue(refIds.contains(new Long(ref6.getMessageID())));      assertTrue(refIds.contains(new Long(ref7.getMessageID())));      assertTrue(refIds.contains(new Long(ref8.getMessageID())));      assertTrue(refIds.contains(new Long(ref9.getMessageID())));      assertTrue(refIds.contains(new Long(ref10.getMessageID())));            List msgs = getMessageIds();      assertNotNull(msgs);      assertEquals(10, msgs.size());      assertTrue(msgs.contains(new Long(ref1.getMessageID())));      assertTrue(msgs.contains(new Long(ref2.getMessageID())));      assertTrue(msgs.contains(new Long(ref3.getMessageID())));      assertTrue(msgs.contains(new Long(ref4.getMessageID())));      assertTrue(msgs.contains(new Long(ref5.getMessageID())));      assertTrue(msgs.contains(new Long(ref6.getMessageID())));      assertTrue(msgs.contains(new Long(ref7.getMessageID())));      assertTrue(msgs.contains(new Long(ref8.getMessageID())));      assertTrue(msgs.contains(new Long(ref9.getMessageID())));      assertTrue(msgs.contains(new Long(ref10.getMessageID())));            int numberOfReferences = pm.getNumberOfReferences(channel.getChannelID());            assertEquals(10, numberOfReferences);            pm.removeReference(channel.getChannelID(), ref1, null);            numberOfReferences = pm.getNumberOfReferences(channel.getChannelID());            assertEquals(9, numberOfReferences);             pm.removeAllChannelData(channel.getChannelID());        }