protected double getOsnr(JsonNode connectivityReply, String name) {
        double osnr = -1;
        if (connectivityReply.has("result")
                && connectivityReply.get("result").has("response")) {
            Iterator<JsonNode> paths = connectivityReply.get("result").get("response")
                    .elements();
            while (paths.hasNext()) {
                JsonNode path = paths.next();
                if (path.get("response-id").asText().equals(name)) {
                    Iterator<JsonNode> elements = path.get("path-properties").get("path-metric").elements();
                    Iterable<JsonNode> iterable = () -> elements;
                    List<JsonNode> elementsList = StreamSupport
                            .stream(iterable.spliterator(), false)
                            .collect(Collectors.toList());
                    for (JsonNode node : elementsList) {
                        if (node.has("metric-type") &&
                                node.get("metric-type").asText().equals("OSNR-0.1nm")) {
                            osnr = node.get("accumulative-value").asDouble();
                            break;
                        }
                    }
                    if (osnr != -1) {
                        break;
                    }
                }
            }
        }
        return osnr;
    }
@Test
    public void testGetOsnr() throws IOException {
        double osnr = manager.getOsnr(reply, "second");
        assertEquals(23.47, osnr);
    }