test_class.file: metrics-influxdb/src/test/java/com/izettle/metrics/influxdb/GroupedInfluxDbHttpSenderTest.java
test_class.identifier: GroupedInfluxDbHttpSenderTest
test_case.body: @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);
          }
      }
test_case.class_method_signature: GroupedInfluxDbHttpSenderTest.shouldNotThrowException()
test_case.full_signature: @Test public void shouldNotThrowException()
test_case.identifier: shouldNotThrowException
test_case.invocations: create createContext setExecutor start assertThat getSerializer assertThat getWriteObject assertThat isEmpty getTags assertThat equals getDatabase getWriteObject assertThat writeData flush stop
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void shouldNotThrowException()
focal_class.declarator: groupMeasurement
focal_class.modifier: private final
focal_class.original_string: private final String groupMeasurement;
focal_class.type: String
focal_class.var_name: groupMeasurement
focal_class.file: metrics-influxdb/src/main/java/com/izettle/metrics/influxdb/GroupedInfluxDbHttpSender.java
focal_class.identifier: GroupedInfluxDbHttpSender
focal_class.class_method_signature: GroupedInfluxDbHttpSender.GroupedInfluxDbHttpSender(String protocol, String hostname, int port, String database, String authString,
              TimeUnit timePrecision, int connectTimeout, int readTimeout, String measurementPrefix, String groupMeasurement)
focal_class.full_signature: public  GroupedInfluxDbHttpSender(String protocol, String hostname, int port, String database, String authString,
              TimeUnit timePrecision, int connectTimeout, int readTimeout, String measurementPrefix, String groupMeasurement)
focal_class.identifier: GroupedInfluxDbHttpSender
focal_class.modifiers: public
focal_class.parameters: (String protocol, String hostname, int port, String database, String authString,
              TimeUnit timePrecision, int connectTimeout, int readTimeout, String measurementPrefix, String groupMeasurement)
focal_class.signature:  GroupedInfluxDbHttpSender(String protocol, String hostname, int port, String database, String authString,
              TimeUnit timePrecision, int connectTimeout, int readTimeout, String measurementPrefix, String groupMeasurement)
focal_class.class_method_signature: GroupedInfluxDbHttpSender.writeData()
focal_class.full_signature: @Override public int writeData()
focal_class.identifier: writeData
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: int
focal_class.signature: int writeData()
focal_class.superclass: extends InfluxDbHttpSender
focal_method.body: @Override
      public int writeData() throws Exception {
          InfluxDbWriteObjectSerializer serializer = this.getSerializer();
          InfluxDbWriteObject writeObject = this.getWriteObject();
          String linestr = serializer.getGroupedLineProtocolString(writeObject, groupMeasurement);
          final byte[] line = linestr.getBytes(UTF_8);
          return super.writeData(line);
      }
focal_method.class_method_signature: GroupedInfluxDbHttpSender.writeData()
focal_method.full_signature: @Override public int writeData()
focal_method.identifier: writeData
focal_method.invocations: getSerializer getWriteObject getGroupedLineProtocolString getBytes writeData
focal_method.modifiers: @Override public
focal_method.parameters: ()
focal_method.return: int
focal_method.signature: int writeData()