@Test
@SuppressWarnings("unchecked")
public void removeAllBookmarksOfUser() {

    // given
    Set<Project> bookmarksMock = mock(Set.class);
    given(userMock.getBookmarks()).willReturn(bookmarksMock);
    // when
    bookmarkService.removeAllBookmarksOfUser(userMock);
    // then
    verify(bookmarksMock).clear();
    verify(userRepository).save(userMock);
}