Package org.apache.sling.replication.component

Examples of org.apache.sling.replication.component.ReplicationComponentFactory.createComponent()


                "endpoints[2]=http://localhost:103/libs/sling/replication/services/importers/default",
                "endpoints.strategy=All"});
        ReplicationComponentFactory replicationComponentFactory = mock(ReplicationComponentFactory.class);
        ReplicationAgent replicationAgent = mock(ReplicationAgent.class);
        CoordinatingReplicationAgentFactory coordinatingReplicationAgentFactory = new CoordinatingReplicationAgentFactory();
        when(replicationComponentFactory.createComponent(ReplicationAgent.class, config, coordinatingReplicationAgentFactory)).
                thenReturn(replicationAgent);

        Field componentFactory = coordinatingReplicationAgentFactory.getClass().getDeclaredField("componentFactory");
        componentFactory.setAccessible(true);
        componentFactory.set(coordinatingReplicationAgentFactory, replicationComponentFactory);
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.