RetryPolicy retryPolicy = new RunOnce();
BigInteger key = BigInteger.ZERO;
LOG.info(key.toString() + " 127.0.1.2");
OperationResult<String> result = cp.executeWithFailover(new TokenTestOperation(key), retryPolicy);
assertNotNull(result);
assertEquals("127.0.1.2",result.getHost().getIpAddress());
key = BigInteger.ONE;
LOG.info(key.toString() + " 127.0.1.0");
result = cp.executeWithFailover(new TokenTestOperation(key), retryPolicy);
assertNotNull(result);
assertEquals("127.0.1.0",result.getHost().getIpAddress());
key = threeNodeRingIncrement.subtract(BigInteger.ONE);
LOG.info(key.toString() + " 127.0.1.0");
result = cp.executeWithFailover(new TokenTestOperation(key), retryPolicy);
assertNotNull(result);
assertEquals("127.0.1.0",result.getHost().getIpAddress());
key = threeNodeRingIncrement;
LOG.info(key.toString() + " 127.0.1.0");
result = cp.executeWithFailover(new TokenTestOperation(key), retryPolicy);
assertNotNull(result);
assertEquals("127.0.1.0",result.getHost().getIpAddress());
key = threeNodeRingIncrement.add(BigInteger.ONE);
LOG.info(key.toString() + " 127.0.1.1");
result = cp.executeWithFailover(new TokenTestOperation(key), retryPolicy);
assertNotNull(result);
assertEquals("127.0.1.1",result.getHost().getIpAddress());
key = threeNodeRingIncrement.add(threeNodeRingIncrement).add(BigInteger.ONE);
LOG.info(key.toString() + " 127.0.1.1");
result = cp.executeWithFailover(new TokenTestOperation(key), retryPolicy);
assertNotNull(result);
assertEquals("127.0.1.1",result.getHost().getIpAddress());
key = threeNodeRingIncrement.add(threeNodeRingIncrement).add(BigInteger.ONE).add(BigInteger.ONE);
LOG.info(key.toString() + " 127.0.1.2");
result = cp.executeWithFailover(new TokenTestOperation(key), retryPolicy);
assertNotNull(result);
assertEquals("127.0.1.2",result.getHost().getIpAddress());
}