@Test
public void should_return_conflict_on_non_empty_folder_remove() throws IOException {

    //given
    createFolder("beer", home.getId());
    final Folder beer = getFolder(home.getId(), "beer");
    final FolderEntry folderEntry = new FolderEntry(DATASET, "6f8a54051bc454");
    createFolderEntry(folderEntry, beer.getId());
    //when
    final Response response = removeFolder(beer.getId());
    //then
    assertThat(response.getStatusCode(), is(409));
    final String content = response.asString();
    assertTrue(StringUtils.isNoneBlank(content));
    assertTrue(content.contains(FolderErrorCodes.FOLDER_NOT_EMPTY.name()));
    final List<Folder> folders = getFolderChildren(home.getId());
    assertThat(folders, hasSize(1));
}