@Test
public void shouldCatchExceptions() throws Exception {

    doThrow(ConnectException.class).when(influxDb).writeData();
    reporter.report(map("gauge", gauge((byte) 1)), this.map(), this.map(), this.map(), this.map());
    doThrow(IOException.class).when(influxDb).writeData();
    reporter.report(map("gauge", gauge((byte) 1)), this.map(), this.map(), this.map(), this.map());
    doThrow(RuntimeException.class).when(influxDb).flush();
    reporter.report(map("gauge", gauge((byte) 1)), this.map(), this.map(), this.map(), this.map());
}