PublishingRootObject { public PublishingQueueImpl getPublishingQueue() { return getEnvironment().getPublishingQueue(); }  Environment getEnvironment(); NodeRef getChannelContainer(); PublishingQueueImpl getPublishingQueue(); void setPublishingStore(String publishingStore); void setPublishingRootPath(String publishingRootPath); void setRetryingTransactionHelper(RetryingTransactionHelper retryingTransactionHelper); void setNamespaceService(NamespaceService namespaceService); void setNodeService(NodeService nodeService); void setPublishingEventHelper(PublishingEventHelper publishingEventHelper); void setSearchService(SearchService searchService); void setPermissionService(PermissionService permissionService); static final String NAME; }
@Test public void testGetPublishingQueue() throws Exception { PublishingQueueImpl theQueue = rootObject.getPublishingQueue(); assertNotNull(theQueue); NodeRef queueNode = theQueue.getNodeRef(); assertTrue(nodeService.exists(queueNode)); assertEquals(PublishingModel.TYPE_PUBLISHING_QUEUE, nodeService.getType(queueNode)); ChildAssociationRef parentAssoc = nodeService.getPrimaryParent(queueNode); assertEquals(PublishingModel.ASSOC_PUBLISHING_QUEUE, parentAssoc.getTypeQName()); assertEquals(rootObject.getEnvironment().getNodeRef(), parentAssoc.getParentRef()); }