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

    // given
    Set<ProjectApplication> applicationsMock = mock(Set.class);
    given(userMock.getApplications()).willReturn(applicationsMock);
    // when
    repoUserService.removeAllApplicationsOfUser(userMock);
    // then
    verify(applicationsMock).clear();
    verify(userRepoMock).save(userMock);
}