@Test(expected = TopicOffsetOutOfRangeException.class)
public void fetchMessagesWithInvalidOffsetAndDefaultHandlingEnabled() throws Exception {

    config = new KafkaConfig(brokerHosts, "newTopic");
    String value = "test";
    createTopicAndSendMessage(value);
    KafkaUtils.fetchMessages(config, simpleConsumer,
            new Partition(Broker.fromString(broker.getBrokerConnectionString()), 0), -99);
}