@@ -0,0 +1,2818 @@
+package org.buddycloud.channelserver.packetprocessor.iq.namespace.pubsub.get;%0A%0Aimport java.util.ArrayList;%0Aimport java.util.Arrays;%0Aimport java.util.concurrent.BlockingQueue;%0Aimport java.util.concurrent.LinkedBlockingQueue;%0Aimport java.util.concurrent.TimeUnit;%0A%0Aimport junit.framework.Assert;%0A%0Aimport org.buddycloud.channelserver.channel.ChannelManager;%0Aimport org.buddycloud.channelserver.db.ClosableIteratorImpl;%0Aimport org.buddycloud.channelserver.db.CloseableIterator;%0Aimport org.buddycloud.channelserver.db.exception.NodeStoreException;%0Aimport org.buddycloud.channelserver.db.mock.Mock;%0Aimport org.buddycloud.channelserver.packetHandler.iq.IQTestHandler;%0Aimport org.buddycloud.channelserver.packetprocessor.iq.namespace.pubsub.JabberPubsub;%0Aimport org.buddycloud.channelserver.pubsub.accessmodel.AccessModels;%0Aimport org.buddycloud.channelserver.pubsub.affiliation.Affiliations;%0Aimport org.buddycloud.channelserver.pubsub.model.NodeItem;%0Aimport org.buddycloud.channelserver.pubsub.model.NodeSubscription;%0Aimport org.buddycloud.channelserver.pubsub.model.impl.NodeAffiliationImpl;%0Aimport org.buddycloud.channelserver.pubsub.model.impl.NodeSubscriptionImpl;%0Aimport org.buddycloud.channelserver.pubsub.subscription.Subscriptions;%0Aimport org.buddycloud.channelserver.utils.node.NodeAclRefuseReason;%0Aimport org.buddycloud.channelserver.utils.node.NodeViewAcl;%0Aimport org.dom4j.Element;%0Aimport org.dom4j.Namespace;%0Aimport org.dom4j.QName;%0Aimport org.dom4j.tree.BaseElement;%0Aimport org.junit.Before;%0Aimport org.junit.Test;%0Aimport org.mockito.Mockito;%0Aimport org.xmpp.packet.IQ;%0Aimport org.xmpp.packet.JID;%0Aimport org.xmpp.packet.Packet;%0Aimport org.xmpp.packet.PacketError;%0Aimport org.xmpp.resultsetmanagement.ResultSetImpl;%0A%0Apublic class SubscriptionsGetTest extends IQTestHandler %7B%0A%0A%09private IQ request;%0A%09private SubscriptionsGet subscriptionsGet;%0A%09private Element element;%0A%09private BlockingQueue%3CPacket%3E queue = new LinkedBlockingQueue%3CPacket%3E();%0A%0A%09private String node = %22/user/pamela@denmark.lit/posts%22;%0A%09private JID jid = new JID(%22juliet@shakespeare.lit%22);%0A%09private ChannelManager channelManager;%0A%0A%09@Before%0A%09public void setUp() throws Exception %7B%0A%0A%09%09queue = new LinkedBlockingQueue%3CPacket%3E();%0A%09%09subscriptionsGet = new SubscriptionsGet(queue, channelManager);%0A%09%09element = new BaseElement(%22subscriptions%22);%0A%0A%09%09channelManager = Mockito.mock(Mock.class);%0A%09%09Mockito.when(channelManager.isLocalNode(Mockito.anyString()))%0A%09%09%09%09.thenReturn(true);%0A%09%09subscriptionsGet.setChannelManager(channelManager);%0A%09%7D%0A%0A%09@Test%0A%09public void testPassingAffiliationsAsElementNameReturnsTrue() %7B%0A%09%09Assert.assertTrue(subscriptionsGet.accept(element));%0A%09%7D%0A%0A%09@Test%0A%09public void testPassingNotCreateAsElementNameReturnsFalse() %7B%0A%09%09Element element = new BaseElement(%22not-subscriptions%22);%0A%09%09Assert.assertFalse(subscriptionsGet.accept(element));%0A%09%7D%0A%7D

Add *very* basic tests for SubscriptionsGet