protected ByteArrayOutputStream createGnpyRequest(ConnectPoint ingress,
                                                      ConnectPoint egress, boolean bidirectional) {
        /*
        {
  "path-request": [
    {
      "request-id": "first",
      "source": "trx-Amsterdam",
      "destination": "trx-Bremen",
      "src-tp-id": "trx-Amsterdam",
      "dst-tp-id": "trx-Bremen",
      "bidirectional": false,
      "path-constraints": {
        "te-bandwidth": {
          "technology": "flexi-grid",
          "trx_type": "Voyager",
          "trx_mode": null,
          "effective-freq-slot": [
            {
              "N": "null",
              "M": "null"
            }
          ],
          "spacing": 50000000000.0,
          "max-nb-of-channel": null,
          "output-power": null,
          "path_bandwidth": 100000000000.0
        }
      }
    }
    ]
    }
         */
        ByteArrayOutputStream stream = new ByteArrayOutputStream();
        try {
            JsonGenerator generator = getJsonGenerator(stream);
            generator.writeStartObject();
            generator.writeArrayFieldStart("path-request");
            generator.writeStartObject();
            generator.writeStringField("request-id", "onos-" + counter.getAndIncrement());
            generator.writeStringField("source", ingress.deviceId().toString());
            generator.writeStringField("destination", egress.deviceId().toString());
            generator.writeStringField("src-tp-id", ingress.deviceId().toString());
            generator.writeStringField("dst-tp-id", egress.deviceId().toString());
            generator.writeBooleanField("bidirectional", bidirectional);
            generator.writeObjectFieldStart("path-constraints");
            generator.writeObjectFieldStart("te-bandwidth");
            generator.writeStringField("technology", "flexi-grid");
            generator.writeStringField("trx_type", "Cassini"); //TODO make variable
            generator.writeNullField("trx_mode");
            generator.writeArrayFieldStart("effective-freq-slot");
            generator.writeStartObject();
            generator.writeStringField("N", "null");
            generator.writeStringField("M", "null");
            generator.writeEndObject();
            generator.writeEndArray();
            generator.writeNumberField("spacing", 50000000000.0);
            generator.writeNullField("max-nb-of-channel");
            generator.writeNullField("output-power");
            generator.writeNumberField("path_bandwidth", 100000000000.0);
            generator.writeEndObject();
            generator.writeEndObject();
            generator.writeEndObject();
            generator.writeEndArray();
            generator.writeEndObject();
            generator.close();
            return stream;
        } catch (IOException e) {
            log.error("Cant' create json", e);
        }
        return stream;

    }
@Test
    public void testCreateGnpyRequest() {
        ConnectPoint ingress = ConnectPoint.fromString("netconf:10.0.254.93:830/1");
        ConnectPoint egress = ConnectPoint.fromString("netconf:10.0.254.94:830/1");
        String output = manager.createGnpyRequest(ingress, egress, true).toString();
        System.out.println(output);
        assertEquals("Json to create network connectivity is wrong", REQUEST, output);
    }