    @Test
    public void testWorkflow() throws IOException, InterruptedException {


        byte[] img = Resources.toByteArray(Resources.getResource("lions.jpg"));

        Response response1 = RestAssured
            .given()
                .content(img)
                .header(HttpHeaders.CONTENT_TYPE, "image/jpeg")
            .expect()
                .statusCode(201)
            .when()
                .post(LdpWebService.PATH)
            .andReturn();

        String resourceUri = response1.getHeader("Location");

        Response response3 = RestAssured
            .given()
                .header(HttpHeaders.ACCEPT, "image/jpeg")
            .expect()
                .statusCode(200)
                .body(CoreMatchers.notNullValue())
            .when()
                .get(resourceUri + "?xywh=333,354,135,115")
            .andReturn();

        BufferedImage image = ImageIO.read(response3.body().asInputStream());

        draw(image);

        Assert.assertEquals(135, image.getWidth());
        Assert.assertEquals(115, image.getHeight());

        //add annotation
        Response response4 = RestAssured
            .given()
                .content((
                        "<> a <" + OA.Annotation + ">; " +
                                "<" + OA.hasTarget + "> <" + resourceUri + "#xywh=333,354,135,115>; " +
                                "<" + OA.hasBody + "> \"Lion\".").getBytes())
                .header(HttpHeaders.CONTENT_TYPE, RDFFormat.TURTLE.getDefaultMIMEType())
            .expect()
                .statusCode(201)
            .when()
                .post(resourceUri.substring(0,resourceUri.length() - ".jpg".length()))
            .andReturn();

        String annotationUri = response4.getHeader("Location");

        Response response5 = RestAssured
            .given()
                .header(HttpHeaders.ACCEPT, RDFFormat.TURTLE.getDefaultMIMEType())
            .expect()
                .statusCode(200)
            .when()
                .get(annotationUri)
            .andReturn();

        String result = response5.getBody().print();
        Assert.assertTrue(result.contains("<http://www.w3.org/ns/oa#hasBody> \"Lion\" ."));
    }