@POST
    @Consumes({ MediaTypeRestconf.APPLICATION_YANG_DATA_JSON, MediaType.APPLICATION_JSON })
    @Produces(MediaTypeRestconf.APPLICATION_YANG_DATA_JSON)
    @Path("data/{identifier : .+}")
    public Response handlePostRequest(@PathParam("identifier") String uriString,
                                      InputStream stream) {
        log.debug("handlePostRequest: {}", uriString);

        URI uri = uriInfo.getRequestUri();

        try {
            ObjectNode rootNode = readTreeFromStream(mapper(), stream);

            service.runPostOperationOnDataResource(uri, rootNode);
            return Response.created(uriInfo.getRequestUri()).build();
        } catch (JsonProcessingException e) {
            log.error("ERROR: handlePostRequest ", e);
            RestconfError error = RestconfError
                    .builder(RestconfError.ErrorType.APPLICATION, RestconfError.ErrorTag.MALFORMED_MESSAGE)
                    .errorMessage(e.getMessage()).errorAppTag("handlePostRequest").build();
            return Response.status(BAD_REQUEST)
                    .entity(RestconfError.wrapErrorAsJson(Arrays.asList(error))).build();
        } catch (RestconfException e) {
            log.error("ERROR: handlePostRequest: {}", e.getMessage());
            log.debug("Exception in handlePostRequest:", e);
            return Response.status(e.getResponse().getStatus())
                    .entity(e.toRestconfErrorJson()).build();
        } catch (IOException ex) {
            log.error("ERROR: handlePostRequest ", ex);
            RestconfError error = RestconfError
                    .builder(RestconfError.ErrorType.APPLICATION, RestconfError.ErrorTag.OPERATION_FAILED)
                    .errorMessage(ex.getMessage()).errorAppTag("handlePostRequest").build();
            return Response.status(INTERNAL_SERVER_ERROR)
                    .entity(RestconfError.wrapErrorAsJson(Arrays.asList(error))).build();
        }
    }
@Test
    public void testHandlePostRequest() {
        ObjectMapper mapper = new ObjectMapper();
        ObjectNode ietfSystemSubNode = mapper.createObjectNode();
        ietfSystemSubNode.put("contact", "Open Networking Foundation");
        ietfSystemSubNode.put("hostname", "host1");
        ietfSystemSubNode.put("location", "The moon");

        ObjectNode ietfSystemNode = mapper.createObjectNode();
        ietfSystemNode.put("ietf-system:system", ietfSystemSubNode);

        WebTarget wt = target();
        Response response = wt.path("/" + DATA_IETF_SYSTEM_SYSTEM)
                .request()
                .post(Entity.json(ietfSystemNode.toString()));
        assertEquals(201, response.getStatus());
    }