@Test
public void shouldCopy() throws Exception {

    // given
    String originalId = createCSVDataSet(this.getClass().getResourceAsStream(T_SHIRT_100_CSV), "original");
    // when
    final Response response = given() //
            .queryParam("copyName", "copy") //
            .when()//
            .expect()
            .statusCode(200)
            .log()
            .ifError() //
            .post("/datasets/{id}/copy", originalId);
    // then
    assertEquals(200, response.getStatusCode());
    final String copyId = response.asString();
    final DataSetMetadata copy = dataSetMetadataRepository.get(copyId);
    assertNotNull(copy);
    assertEquals(9, copy.getRowMetadata().size());
}