    @Test
    public void testCreateUser(@ArquillianResource URL resource) throws Exception {

        URL apiUrl = new URL(resource, "resources/users");
        JsonObject user = Json.createObjectBuilder()
                .add("name", "Marcus")
                .add("email", "marcus_1982@jee8ng.org")
                .add("credential", credential("marcus", "1234"))
                .build();

        Response initiallyCreated = ClientBuilder.newClient().target(apiUrl.toURI())
                .request(MediaType.APPLICATION_JSON)
                .post(Entity.json(user));
        assertThat(initiallyCreated.getStatus(), is(201));

        String location = initiallyCreated.getHeaderString("Location");
        assertNotNull(location);
    }