@Test
public void update() throws Exception {

    User created = service.create("name", "pwd", "mail");
    Response response = WebClient.create("http://localhost:4204/rest-on-ejb")
            .path("/user/update/" + created.getId())
            .query("name", "corrected")
            .query("pwd", "userpwd")
            .query("mail", "it@is.ok")
            .post(null);
    JAXBContext ctx = JAXBContext.newInstance(User.class);
    Unmarshaller unmarshaller = ctx.createUnmarshaller();
    User modified = (User) unmarshaller.unmarshal(InputStream.class.cast(response.getEntity()));
    assertEquals("corrected", modified.getFullname());
    assertEquals("userpwd", modified.getPassword());
    assertEquals("it@is.ok", modified.getEmail());
}