test_class.file: metrics-influxdb/src/test/java/com/izettle/metrics/influxdb/utils/InfluxDbWriteObjectSerializerTest.java
test_class.identifier: InfluxDbWriteObjectSerializerTest
test_case.body: @Test
      public void shouldSerializeUsingLineProtocol() {
          Map<String, String> tags = new HashMap<String, String>();
          tags.put("tag1Key", "tag1Value");
          Map<String, Object> fields = new HashMap<String, Object>();
          fields.put("field1Key", "field1Value");
          InfluxDbPoint point1 = new InfluxDbPoint("measurement1", tags, 456l, fields);
          Set<InfluxDbPoint> set = new HashSet<InfluxDbPoint>();
          set.add(point1);
          InfluxDbWriteObject influxDbWriteObject = mock(InfluxDbWriteObject.class);
          when(influxDbWriteObject.getPoints()).thenReturn(set);
          when(influxDbWriteObject.getPrecision()).thenReturn(TimeUnit.MICROSECONDS);
          InfluxDbWriteObjectSerializer influxDbWriteObjectSerializer = new InfluxDbWriteObjectSerializer("");
          String lineString = influxDbWriteObjectSerializer.getLineProtocolString(influxDbWriteObject);
          assertThat(lineString).isEqualTo(
              "measurement1,tag1Key=tag1Value field1Key=\"field1Value\" 456000\n");
          InfluxDbPoint point2 = new InfluxDbPoint("measurement1", tags, 456l, fields);
          set.add(point2);
          lineString = influxDbWriteObjectSerializer.getLineProtocolString(influxDbWriteObject);
          assertThat(lineString).isEqualTo(
              "measurement1,tag1Key=tag1Value field1Key=\"field1Value\" 456000\n"
                  + "measurement1,tag1Key=tag1Value field1Key=\"field1Value\" 456000\n");
      }
test_case.class_method_signature: InfluxDbWriteObjectSerializerTest.shouldSerializeUsingLineProtocol()
test_case.full_signature: @Test public void shouldSerializeUsingLineProtocol()
test_case.identifier: shouldSerializeUsingLineProtocol
test_case.invocations: put put add mock thenReturn when getPoints thenReturn when getPrecision getLineProtocolString isEqualTo assertThat add getLineProtocolString isEqualTo assertThat
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void shouldSerializeUsingLineProtocol()
focal_class.declarator: COMMA = Pattern.compile(",")
focal_class.modifier: private static final
focal_class.original_string: private static final Pattern COMMA = Pattern.compile(",");
focal_class.type: Pattern
focal_class.var_name: COMMA
focal_class.declarator: SPACE = Pattern.compile(" ")
focal_class.modifier: private static final
focal_class.original_string: private static final Pattern SPACE = Pattern.compile(" ");
focal_class.type: Pattern
focal_class.var_name: SPACE
focal_class.declarator: EQUAL = Pattern.compile("=")
focal_class.modifier: private static final
focal_class.original_string: private static final Pattern EQUAL = Pattern.compile("=");
focal_class.type: Pattern
focal_class.var_name: EQUAL
focal_class.declarator: DOUBLE_QUOTE = Pattern.compile("\"")
focal_class.modifier: private static final
focal_class.original_string: private static final Pattern DOUBLE_QUOTE = Pattern.compile("\"");
focal_class.type: Pattern
focal_class.var_name: DOUBLE_QUOTE
focal_class.declarator: FIELD = Pattern.compile("\\.")
focal_class.modifier: private static final
focal_class.original_string: private static final Pattern FIELD = Pattern.compile("\\.");
focal_class.type: Pattern
focal_class.var_name: FIELD
focal_class.declarator: measurementPrefix
focal_class.modifier: private final
focal_class.original_string: private final String measurementPrefix;
focal_class.type: String
focal_class.var_name: measurementPrefix
focal_class.file: metrics-influxdb/src/main/java/com/izettle/metrics/influxdb/utils/InfluxDbWriteObjectSerializer.java
focal_class.identifier: InfluxDbWriteObjectSerializer
focal_class.class_method_signature: InfluxDbWriteObjectSerializer.InfluxDbWriteObjectSerializer(String measurementPrefix)
focal_class.full_signature: public  InfluxDbWriteObjectSerializer(String measurementPrefix)
focal_class.identifier: InfluxDbWriteObjectSerializer
focal_class.modifiers: public
focal_class.parameters: (String measurementPrefix)
focal_class.signature:  InfluxDbWriteObjectSerializer(String measurementPrefix)
focal_class.class_method_signature: InfluxDbWriteObjectSerializer.getLineProtocolString(InfluxDbWriteObject influxDbWriteObject)
focal_class.full_signature: public String getLineProtocolString(InfluxDbWriteObject influxDbWriteObject)
focal_class.identifier: getLineProtocolString
focal_class.modifiers: public
focal_class.parameters: (InfluxDbWriteObject influxDbWriteObject)
focal_class.return: String
focal_class.signature: String getLineProtocolString(InfluxDbWriteObject influxDbWriteObject)
focal_class.class_method_signature: InfluxDbWriteObjectSerializer.getGroupedLineProtocolString(InfluxDbWriteObject influxDbWriteObject, String realMeasurement)
focal_class.full_signature: public String getGroupedLineProtocolString(InfluxDbWriteObject influxDbWriteObject, String realMeasurement)
focal_class.identifier: getGroupedLineProtocolString
focal_class.modifiers: public
focal_class.parameters: (InfluxDbWriteObject influxDbWriteObject, String realMeasurement)
focal_class.return: String
focal_class.signature: String getGroupedLineProtocolString(InfluxDbWriteObject influxDbWriteObject, String realMeasurement)
focal_class.class_method_signature: InfluxDbWriteObjectSerializer.mergeFields(Map<String, Object> dest, Map<String, Object> src, String measurement)
focal_class.full_signature: private void mergeFields(Map<String, Object> dest, Map<String, Object> src, String measurement)
focal_class.identifier: mergeFields
focal_class.modifiers: private
focal_class.parameters: (Map<String, Object> dest, Map<String, Object> src, String measurement)
focal_class.return: void
focal_class.signature: void mergeFields(Map<String, Object> dest, Map<String, Object> src, String measurement)
focal_class.class_method_signature: InfluxDbWriteObjectSerializer.pointLineProtocol(InfluxDbPoint point, TimeUnit precision, StringBuilder stringBuilder)
focal_class.full_signature: private void pointLineProtocol(InfluxDbPoint point, TimeUnit precision, StringBuilder stringBuilder)
focal_class.identifier: pointLineProtocol
focal_class.modifiers: private
focal_class.parameters: (InfluxDbPoint point, TimeUnit precision, StringBuilder stringBuilder)
focal_class.return: void
focal_class.signature: void pointLineProtocol(InfluxDbPoint point, TimeUnit precision, StringBuilder stringBuilder)
focal_class.class_method_signature: InfluxDbWriteObjectSerializer.lineProtocol(Map<String, String> tags, Map<String, Object> fields,
              String measurement, Long time, TimeUnit precision, StringBuilder stringBuilder)
focal_class.full_signature: private void lineProtocol(Map<String, String> tags, Map<String, Object> fields,
              String measurement, Long time, TimeUnit precision, StringBuilder stringBuilder)
focal_class.identifier: lineProtocol
focal_class.modifiers: private
focal_class.parameters: (Map<String, String> tags, Map<String, Object> fields,
              String measurement, Long time, TimeUnit precision, StringBuilder stringBuilder)
focal_class.return: void
focal_class.signature: void lineProtocol(Map<String, String> tags, Map<String, Object> fields,
              String measurement, Long time, TimeUnit precision, StringBuilder stringBuilder)
focal_class.class_method_signature: InfluxDbWriteObjectSerializer.concatenatedTags(Map<String, String> tags, StringBuilder stringBuilder)
focal_class.full_signature: private void concatenatedTags(Map<String, String> tags, StringBuilder stringBuilder)
focal_class.identifier: concatenatedTags
focal_class.modifiers: private
focal_class.parameters: (Map<String, String> tags, StringBuilder stringBuilder)
focal_class.return: void
focal_class.signature: void concatenatedTags(Map<String, String> tags, StringBuilder stringBuilder)
focal_class.class_method_signature: InfluxDbWriteObjectSerializer.concatenateFields(Map<String, Object> fields, StringBuilder stringBuilder)
focal_class.full_signature: private void concatenateFields(Map<String, Object> fields, StringBuilder stringBuilder)
focal_class.identifier: concatenateFields
focal_class.modifiers: private
focal_class.parameters: (Map<String, Object> fields, StringBuilder stringBuilder)
focal_class.return: void
focal_class.signature: void concatenateFields(Map<String, Object> fields, StringBuilder stringBuilder)
focal_class.class_method_signature: InfluxDbWriteObjectSerializer.formattedTime(Long time, TimeUnit precision, StringBuilder stringBuilder)
focal_class.full_signature: private void formattedTime(Long time, TimeUnit precision, StringBuilder stringBuilder)
focal_class.identifier: formattedTime
focal_class.modifiers: private
focal_class.parameters: (Long time, TimeUnit precision, StringBuilder stringBuilder)
focal_class.return: void
focal_class.signature: void formattedTime(Long time, TimeUnit precision, StringBuilder stringBuilder)
focal_class.class_method_signature: InfluxDbWriteObjectSerializer.escapeKey(String key)
focal_class.full_signature: private String escapeKey(String key)
focal_class.identifier: escapeKey
focal_class.modifiers: private
focal_class.parameters: (String key)
focal_class.return: String
focal_class.signature: String escapeKey(String key)
focal_class.class_method_signature: InfluxDbWriteObjectSerializer.escapeMeasurement(String key)
focal_class.full_signature: private String escapeMeasurement(String key)
focal_class.identifier: escapeMeasurement
focal_class.modifiers: private
focal_class.parameters: (String key)
focal_class.return: String
focal_class.signature: String escapeMeasurement(String key)
focal_class.class_method_signature: InfluxDbWriteObjectSerializer.escapeField(String field)
focal_class.full_signature: private String escapeField(String field)
focal_class.identifier: escapeField
focal_class.modifiers: private
focal_class.parameters: (String field)
focal_class.return: String
focal_class.signature: String escapeField(String field)
focal_method.body: public String getLineProtocolString(InfluxDbWriteObject influxDbWriteObject) {
          StringBuilder stringBuilder = new StringBuilder();
          for (InfluxDbPoint point : influxDbWriteObject.getPoints()) {
              pointLineProtocol(point, influxDbWriteObject.getPrecision(), stringBuilder);
              stringBuilder.append("\n");
          }
          return stringBuilder.toString();
      }
focal_method.class_method_signature: InfluxDbWriteObjectSerializer.getLineProtocolString(InfluxDbWriteObject influxDbWriteObject)
focal_method.full_signature: public String getLineProtocolString(InfluxDbWriteObject influxDbWriteObject)
focal_method.identifier: getLineProtocolString
focal_method.invocations: getPoints pointLineProtocol getPrecision append toString
focal_method.modifiers: public
focal_method.parameters: (InfluxDbWriteObject influxDbWriteObject)
focal_method.return: String
focal_method.signature: String getLineProtocolString(InfluxDbWriteObject influxDbWriteObject)