Github user eolivelli commented on the issue:
https://github.com/apache/zookeeper/pull/546
@anmolnar @nkalmar @ivankelly
Thank you all for helping me with this patch.
I have added a bunch of Mockito based tests.
About the existing test..I have only added a check on real JMX about
isLeader, the test was already there.
I can revert the changes on the existing test if you feel strong about it,
but IMHO it ia not a big deal ---
