Examples of ReplicationQueueProvider


Examples of org.apache.sling.replication.queue.ReplicationQueueProvider

        when(properties.get("priority.paths")).thenReturn(new String[]{"/content", "/apps"});
        when(context.getProperties()).thenReturn(properties);
        priorityPathDistributionStrategy.activate(context);
        ReplicationPackage replicationPackage = mock(ReplicationPackage.class);
        when(replicationPackage.getPaths()).thenReturn(new String[]{"/apps"});
        ReplicationQueueProvider queueProvider = mock(ReplicationQueueProvider.class);
        ReplicationQueue queue = mock(ReplicationQueue.class);

        when(queueProvider.getQueue("agentName", "/apps")).thenReturn(queue);
        when(queue.add(any(ReplicationQueueItem.class))).thenReturn(true);

        boolean returnedState = priorityPathDistributionStrategy.add("agentName", replicationPackage, queueProvider);
        assertTrue(returnedState);
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.