@Test(expected = IllegalStateException.class)
public void cantSubscribePatternAndTopic() {

    state.subscribe(Pattern.compile(".*"), rebalanceListener);
    state.subscribe(Arrays.asList(topic), rebalanceListener);
}