@@ -0,0 +1,1840 @@
+package org.fcrepo.webhooks;%0A%0Aimport com.hp.hpl.jena.rdf.model.Model;%0Aimport com.hp.hpl.jena.rdf.model.Resource;%0Aimport org.fcrepo.FedoraResource;%0Aimport org.fcrepo.rdf.GraphSubjects;%0Aimport org.fcrepo.rdf.impl.DefaultGraphSubjects;%0Aimport org.fcrepo.test.util.TestHelpers;%0Aimport org.fcrepo.utils.FedoraJcrTypes;%0Aimport org.junit.Before;%0Aimport org.junit.Test;%0A%0Aimport javax.jcr.Node;%0Aimport javax.jcr.RepositoryException;%0Aimport javax.jcr.nodetype.NodeType;%0Aimport javax.ws.rs.core.UriInfo;%0A%0Aimport static org.fcrepo.RdfLexicon.HAS_FEED;%0Aimport static org.fcrepo.RdfLexicon.HAS_SUBSCRIPTION_SERVICE;%0Aimport static org.junit.Assert.assertTrue;%0Aimport static org.mockito.Mockito.mock;%0Aimport static org.mockito.Mockito.when;%0A%0Apublic class WebhooksResourcesTest %7B%0A    private WebhooksResources testObj;%0A    private Node mockNode;%0A    private FedoraResource mockResource;%0A    private UriInfo uriInfo;%0A    private GraphSubjects mockSubjects;%0A%0A    @Before%0A    public void setUp() %7B%0A        testObj = new WebhooksResources();%0A        mockNode = mock(Node.class);%0A        mockResource = new FedoraResource(mockNode);%0A%0A        uriInfo = TestHelpers.getUriInfoImpl();%0A        mockSubjects = new DefaultGraphSubjects();%0A    %7D%0A%0A    @Test%0A    public void shouldDecorateModeRootNodesWithRepositoryWideLinks() throws RepositoryException %7B%0A%0A        final NodeType mockNodeType = mock(NodeType.class);%0A        when(mockNodeType.isNodeType(FedoraJcrTypes.ROOT)).thenReturn(true);%0A        when(mockNode.getPrimaryNodeType()).thenReturn(mockNodeType);%0A        when(mockNode.getPath()).thenReturn(%22/%22);%0A%0A        Resource graphSubject = mockSubjects.getGraphSubject(mockNode);%0A%0A        final Model model = testObj.createModelForResource(mockResource, uriInfo, mockSubjects);%0A%0A        assertTrue(model.contains(graphSubject, HAS_SUBSCRIPTION_SERVICE));%0A    %7D%0A%7D%0A

test for WebhooksResources