@Test
public void testGetFavoritesDatasetList() {

    when().get("/datasets/favorites").then().statusCode(OK.value()).body(equalTo("[]"));
    String dsId1 = UUID.randomUUID().toString();
    String dsId2 = UUID.randomUUID().toString();
    UserData userData = new UserData(security.getUserId(), versionService.version().getVersionId());
    HashSet<String> favorites = new HashSet<>();
    favorites.add(dsId1);
    favorites.add(dsId2);
    userData.setFavoritesDatasets(favorites);
    userDataRepository.save(userData);
    List<String> favoritesResp = from(when().get("/datasets/favorites").asString()).get();
    assertEquals(2, favoritesResp.size());
    assertThat(favoritesResp, hasItems(dsId1, dsId2));
}