log.debug("+++ testKeyListenerDeadlock()");
MBeanServer mbeanServer =
MBeanServerFactory.createMBeanServer("mockPartition");
try {
ClusterNode localAddress = factory.getClusterNode(new IpAddress("localhost", 12345));
MockHAPartition partition = new MockHAPartition(localAddress);
DistributedReplicantManagerImpl drm = new DistributedReplicantManagerImpl(partition);
drm.createService();
// Create a fake view for the MockHAPartition
Vector<ClusterNode> remoteAddresses = new Vector<ClusterNode>();
for (int i = 1; i < 5; i++)
remoteAddresses.add(factory.getClusterNode(new IpAddress("localhost", 12340 + i)));
Vector<ClusterNode> allNodes = new Vector<ClusterNode>(remoteAddresses);
allNodes.add(localAddress);
partition.setCurrentViewClusterNodes(allNodes);