@Test
public void shouldNotThrowException() throws Exception {

    HttpServer server = HttpServer.create(new InetSocketAddress(10085), 0);
    try {
        server.createContext("/write", new MyHandler());
        server.setExecutor(null); // creates a default executor
        server.start();
        InfluxDbHttpSender influxDbHttpSender = new GroupedInfluxDbHttpSender(
            "http",
            "localhost",
            10085,
            "testdb",
            "asdf",
            TimeUnit.MINUTES,
            1000,
            1000,
            "",
            "MyGroup"
        );
        assertThat(influxDbHttpSender.getSerializer() != null);
        assertThat(influxDbHttpSender.getWriteObject() != null);
        assertThat(influxDbHttpSender.getTags().isEmpty());
        assertThat(influxDbHttpSender.getWriteObject().getDatabase().equals("testdb"));
        assertThat(influxDbHttpSender.writeData(new byte[0]) == 0);
        
        influxDbHttpSender.flush();
        
    } catch (IOException e) {
        throw new IOException(e);
    } finally {
        server.stop(0);
    }
}