@Test
public void getLoadBalancer() throws Exception {

    ConsumerConfig consumerConfig = new ConsumerConfig().setBootstrap("test").setLoadBalancer("test");
    ConsumerBootstrap bootstrap = Bootstraps.from(consumerConfig);
    Assert.assertEquals(LoadBalancerFactory.getLoadBalancer(bootstrap).getClass(), TestLoadBalancer.class);
    boolean error = false;
    try {
        consumerConfig.setLoadBalancer("xasdsa");
        LoadBalancerFactory.getLoadBalancer(bootstrap);
    } catch (Exception e) {
        error = true;
    }
    Assert.assertTrue(error);
}