@Test
public void shouldLocatePreparation() throws Exception {

    // given
    final Folder bar = folderRepository.addFolder(home.getId(), "/foo/bar");
    final String barEntry =
            clientTest.createPreparation(createTestPreparation("youpi", "4824"), bar.getId()).getId();
    // when
    final Response response = given() //
            .when() //
            .expect()
            .statusCode(200)
            .log()
            .ifError() //
            .get("/preparations/{id}/folder", barEntry);
    // then
    assertThat(response.getStatusCode(), is(200));
    try (InputStream responseAsInputStream = response.asInputStream()) {
        final Folder actual = mapper.readValue(responseAsInputStream, Folder.class);
        assertEquals(bar.getId(), actual.getId());
    }
}