}
@Test
public void testDisconnectReconnect() throws Exception {
NodeOperation nodeOperation = mock(NodeOperation.class);
when(_queue.peek()).thenReturn(nodeOperation).thenAnswer(new SleepingAnswer());
_node.start();
Thread.sleep(200);
verify(nodeOperation, times(1)).execute((NodeContext) notNull());
_node.disconnect();
NodeOperation nodeOperation2 = mock(NodeOperation.class);
reset(_queue);
when(_queue.peek()).thenReturn(nodeOperation2).thenAnswer(new SleepingAnswer());
_node.reconnect();
Thread.sleep(200);
verify(nodeOperation, times(1)).execute((NodeContext) notNull());
verify(nodeOperation2, times(1)).execute((NodeContext) notNull());