test_class.declarator: METRIC_JSON =
              JsonObject.newBuilder()
                      .set("consumed",
                              JsonObject.newBuilder()
                                      .set("success", TestConstants.MEASUREMENTS)
                                      .set("failure", TestConstants.MEASUREMENTS)
                                      .build()
                      )
                      .set("mapped",
                              JsonObject.newBuilder()
                                      .set("success", TestConstants.MEASUREMENTS)
                                      .set("failure", TestConstants.MEASUREMENTS)
                                      .build()
                      )
                      .build()
test_class.modifier: private static final
test_class.original_string: private static final JsonObject METRIC_JSON =
              JsonObject.newBuilder()
                      .set("consumed",
                              JsonObject.newBuilder()
                                      .set("success", TestConstants.MEASUREMENTS)
                                      .set("failure", TestConstants.MEASUREMENTS)
                                      .build()
                      )
                      .set("mapped",
                              JsonObject.newBuilder()
                                      .set("success", TestConstants.MEASUREMENTS)
                                      .set("failure", TestConstants.MEASUREMENTS)
                                      .build()
                      )
                      .build();
test_class.type: JsonObject
test_class.var_name: METRIC_JSON
test_class.declarator: ADDRESS_METRIC = ConnectivityModelFactory.newAddressMetric(INBOUND_MEASUREMENTS)
test_class.modifier: private static final
test_class.original_string: private static final AddressMetric ADDRESS_METRIC = ConnectivityModelFactory.newAddressMetric(INBOUND_MEASUREMENTS);
test_class.type: AddressMetric
test_class.var_name: ADDRESS_METRIC
test_class.file: model/connectivity/src/test/java/org/eclipse/ditto/model/connectivity/ImmutableAddressMetricTest.java
test_class.identifier: ImmutableAddressMetricTest
test_case.body: @Test
      public void fromJsonReturnsExpected() {
          final AddressMetric actual = ImmutableAddressMetric.fromJson(METRIC_JSON);
          assertThat(actual).isEqualTo(ADDRESS_METRIC);
      }
test_case.class_method_signature: ImmutableAddressMetricTest.fromJsonReturnsExpected()
test_case.full_signature: @Test public void fromJsonReturnsExpected()
test_case.identifier: fromJsonReturnsExpected
test_case.invocations: fromJson isEqualTo assertThat
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void fromJsonReturnsExpected()
focal_class.declarator: SUCCESS_KEY = JsonFactory.newKey("success")
focal_class.modifier: private static final
focal_class.original_string: private static final JsonKey SUCCESS_KEY = JsonFactory.newKey("success");
focal_class.type: JsonKey
focal_class.var_name: SUCCESS_KEY
focal_class.declarator: FAILURE_KEY = JsonFactory.newKey("failure")
focal_class.modifier: private static final
focal_class.original_string: private static final JsonKey FAILURE_KEY = JsonFactory.newKey("failure");
focal_class.type: JsonKey
focal_class.var_name: FAILURE_KEY
focal_class.declarator: measurements
focal_class.modifier: private final
focal_class.original_string: private final Set<Measurement> measurements;
focal_class.type: Set<Measurement>
focal_class.var_name: measurements
focal_class.file: model/connectivity/src/main/java/org/eclipse/ditto/model/connectivity/ImmutableAddressMetric.java
focal_class.identifier: ImmutableAddressMetric
focal_class.interfaces: implements AddressMetric
focal_class.class_method_signature: ImmutableAddressMetric.ImmutableAddressMetric(final Set<Measurement> measurements)
focal_class.full_signature: private  ImmutableAddressMetric(final Set<Measurement> measurements)
focal_class.identifier: ImmutableAddressMetric
focal_class.modifiers: private
focal_class.parameters: (final Set<Measurement> measurements)
focal_class.signature:  ImmutableAddressMetric(final Set<Measurement> measurements)
focal_class.class_method_signature: ImmutableAddressMetric.of(final Set<Measurement> measurements)
focal_class.full_signature: public static ImmutableAddressMetric of(final Set<Measurement> measurements)
focal_class.identifier: of
focal_class.modifiers: public static
focal_class.parameters: (final Set<Measurement> measurements)
focal_class.return: ImmutableAddressMetric
focal_class.signature: ImmutableAddressMetric of(final Set<Measurement> measurements)
focal_class.class_method_signature: ImmutableAddressMetric.getMeasurements()
focal_class.full_signature: @Override public Set<Measurement> getMeasurements()
focal_class.identifier: getMeasurements
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: Set<Measurement>
focal_class.signature: Set<Measurement> getMeasurements()
focal_class.class_method_signature: ImmutableAddressMetric.toJson(final JsonSchemaVersion schemaVersion, final Predicate<JsonField> thePredicate)
focal_class.full_signature: @Override public JsonObject toJson(final JsonSchemaVersion schemaVersion, final Predicate<JsonField> thePredicate)
focal_class.identifier: toJson
focal_class.modifiers: @Override public
focal_class.parameters: (final JsonSchemaVersion schemaVersion, final Predicate<JsonField> thePredicate)
focal_class.return: JsonObject
focal_class.signature: JsonObject toJson(final JsonSchemaVersion schemaVersion, final Predicate<JsonField> thePredicate)
focal_class.class_method_signature: ImmutableAddressMetric.getMeasurementComparator()
focal_class.full_signature: private static Comparator<Measurement> getMeasurementComparator()
focal_class.identifier: getMeasurementComparator
focal_class.modifiers: private static
focal_class.parameters: ()
focal_class.return: Comparator<Measurement>
focal_class.signature: Comparator<Measurement> getMeasurementComparator()
focal_class.class_method_signature: ImmutableAddressMetric.calculateComparatorScore(final List<MetricType> sortedTypes, final Measurement m1,
              final Measurement m2)
focal_class.full_signature: private static int calculateComparatorScore(final List<MetricType> sortedTypes, final Measurement m1,
              final Measurement m2)
focal_class.identifier: calculateComparatorScore
focal_class.modifiers: private static
focal_class.parameters: (final List<MetricType> sortedTypes, final Measurement m1,
              final Measurement m2)
focal_class.return: int
focal_class.signature: int calculateComparatorScore(final List<MetricType> sortedTypes, final Measurement m1,
              final Measurement m2)
focal_class.class_method_signature: ImmutableAddressMetric.fromJson(final JsonObject jsonObject)
focal_class.full_signature: public static AddressMetric fromJson(final JsonObject jsonObject)
focal_class.identifier: fromJson
focal_class.modifiers: public static
focal_class.parameters: (final JsonObject jsonObject)
focal_class.return: AddressMetric
focal_class.signature: AddressMetric fromJson(final JsonObject jsonObject)
focal_class.class_method_signature: ImmutableAddressMetric.equals(final Object o)
focal_class.full_signature: @Override public boolean equals(final Object o)
focal_class.identifier: equals
focal_class.modifiers: @Override public
focal_class.parameters: (final Object o)
focal_class.return: boolean
focal_class.signature: boolean equals(final Object o)
focal_class.class_method_signature: ImmutableAddressMetric.hashCode()
focal_class.full_signature: @Override public int hashCode()
focal_class.identifier: hashCode
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: int
focal_class.signature: int hashCode()
focal_class.class_method_signature: ImmutableAddressMetric.toString()
focal_class.full_signature: @Override public String toString()
focal_class.identifier: toString
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: String
focal_class.signature: String toString()
focal_class.class_method_signature: ImmutableAddressMetric.toJsonField(final String key, final AddressMetric metric)
focal_class.full_signature: static JsonField toJsonField(final String key, final AddressMetric metric)
focal_class.identifier: toJsonField
focal_class.modifiers: static
focal_class.parameters: (final String key, final AddressMetric metric)
focal_class.return: JsonField
focal_class.signature: JsonField toJsonField(final String key, final AddressMetric metric)
focal_method.body: public static AddressMetric fromJson(final JsonObject jsonObject) {
          final Set<Measurement> readMeasurements = new HashSet<>();
          jsonObject.stream()
                  .filter(field -> field.getValue().isObject())
                  .forEach(f -> Stream.of(SUCCESS_KEY, FAILURE_KEY)
                          .map(key -> JsonFactory.newPointer(JsonFactory.newKey(f.getKeyName()), key))
                          .map(jsonObject::get)
                          .filter(JsonValue::isObject)
                          .filter(o -> !o.isEmpty())
                          .map(JsonValue::asObject)
                          .map(ImmutableMeasurement::fromJson)
                          .forEach(readMeasurements::add));
          return ImmutableAddressMetric.of(readMeasurements);
      }
focal_method.class_method_signature: ImmutableAddressMetric.fromJson(final JsonObject jsonObject)
focal_method.full_signature: public static AddressMetric fromJson(final JsonObject jsonObject)
focal_method.identifier: fromJson
focal_method.invocations: forEach filter stream isObject getValue forEach map map filter filter map map of newPointer newKey getKeyName isEmpty of
focal_method.modifiers: public static
focal_method.parameters: (final JsonObject jsonObject)
focal_method.return: AddressMetric
focal_method.signature: AddressMetric fromJson(final JsonObject jsonObject)