@Test
public void testServerShutDownAfterMaximumRecoverableException() throws Exception {
//Mock a KafkaStream
KafkaStream messageStream = Mockito.mock(KafkaStream.class);
Map<String, List<KafkaStream>> mockedMessageStreams = Collections.singletonMap("TesTopic",Collections.singletonList(messageStream));
ConsumerConnector consumerConnector = Mockito.mock(ConsumerConnector.class);
when(consumerConnector.createMessageStreams(Mockito.anyMap(),Mockito.any(Decoder.class),Mockito.any(Decoder.class))).thenReturn(mockedMessageStreams);
Server jettyServer = PowerMockito.mock(Server.class);
Mockito.doNothing().when(jettyServer).stop();