PublishingRootObject { public Environment getEnvironment() throws BeansException { return createEnvironment(); }  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 testGetEnvironment() throws Exception { Environment theEnvironment = rootObject.getEnvironment(); assertNotNull(theEnvironment); assertTrue(nodeService.exists(theEnvironment.getNodeRef())); assertEquals(PublishingModel.TYPE_ENVIRONMENT, nodeService.getType(theEnvironment.getNodeRef())); }