@Test(expected = GroupAuthorizationException.class)
public void testGroupReadUnauthorized() {

    subscriptions.subscribe(Arrays.asList(topicName), rebalanceListener);
    client.prepareResponse(consumerMetadataResponse(node, Errors.NONE.code()));
    coordinator.ensureCoordinatorReady();
    client.prepareResponse(joinGroupLeaderResponse(0, "memberId", Collections.<String, List<String>>emptyMap(),
            Errors.GROUP_AUTHORIZATION_FAILED.code()));
    coordinator.ensurePartitionAssignment();
}