@Test
public void testCommitOffsetAsyncFailedWithDefaultCallback() {

    int invokedBeforeTest = defaultOffsetCommitCallback.invoked;
    client.prepareResponse(consumerMetadataResponse(node, Errors.NONE.code()));
    coordinator.ensureCoordinatorReady();
    client.prepareResponse(offsetCommitResponse(Collections.singletonMap(tp, Errors.GROUP_COORDINATOR_NOT_AVAILABLE.code())));
    coordinator.commitOffsetsAsync(Collections.singletonMap(tp, new OffsetAndMetadata(100L)), null);
    assertEquals(invokedBeforeTest + 1, defaultOffsetCommitCallback.invoked);
    assertTrue(defaultOffsetCommitCallback.exception instanceof RetriableCommitFailedException);
}