ConnectedComponent component1 = mock(ConnectedComponent.class);
WaitingAnswer waitingAnswer = new WaitingAnswer();
doAnswer(waitingAnswer).when(component1).disconnect();
_protocol = _zk.createInteractionProtocol();
_protocol.registerComponent(component1);
WatchedEvent expiredEvent = new WatchedEvent(new WatcherEvent(EventType.None.getIntValue(), KeeperState.Expired
.getIntValue(), null));
_protocol.getZkClient().process(
new WatchedEvent(new WatcherEvent(EventType.None.getIntValue(), KeeperState.SyncConnected.getIntValue(),
null)));
_protocol.getZkClient().process(expiredEvent);
// verify(component1).disconnect();
ConnectedComponent component2 = mock(ConnectedComponent.class, "2ndComp");