// repeat invocations
final int countBeforeDecrementing = resultAfterShuttingDownANode.getCount();
final String aliveNode = resultAfterShuttingDownANode.getNodeName();
for (int i = NUM_TIMES; i > 0; i--) {
resultAfterShuttingDownANode = remoteCounter.decrement();
Assert.assertNotNull("Result from remote stateful counter, after shutting down a node was null", resultAfterShuttingDownANode);
Assert.assertEquals("Result was received from an unexpected node, after shutting down a node", aliveNode, resultAfterShuttingDownANode.getNodeName());
logger.info("Counter decremented to " + resultAfterShuttingDownANode.getCount() + " on node " + resultAfterShuttingDownANode.getNodeName());
}
final CounterResult finalResult = remoteCounter.getCount();