@Test
 public void testUpdate() {
   Sample r1 = new Sample("toto");
   r1 = this.request("service-based").xmlPost(r1).resource(r1.getClass());
   Sample r2 = new Sample(r1);
   r2.setName("titi");
   r2 = this.request("service-based/" + r1.getId()).xmlPut(r2).resource(r2.getClass());
   Assertions.assertThat(r1).isNotEqualTo(r2);
   Assertions.assertThat(r1.getName()).contains("toto");
   Assertions.assertThat(r2.getName()).contains("titi");
 }
 @Test
 public void testCreateResource() {
   Sample r = new Sample("toto");
   Response response = this.request("service-based").xmlPost(r);
   r = (Sample) response.resource(r.getClass());
   Assertions.assertThat(r).isNotNull();
   Assertions.assertThat(r.getName()).isEqualTo("toto");
 }