@Test
public void wakeup() {

    RequestFuture<ClientResponse> future = consumerClient.send(node, ApiKeys.METADATA, heartbeatRequest());
    consumerClient.wakeup();
    try {
        consumerClient.poll(0);
        fail();
    } catch (WakeupException e) {
    }
    client.respond(heartbeatResponse(Errors.NONE.code()));
    consumerClient.poll(future);
    assertTrue(future.isDone());
}