### Question:
UserSyncService { @VisibleForTesting UsersState getIpaUserState(FreeIpaClient freeIpaClient, UmsUsersState umsUsersState, boolean fullSync) throws FreeIpaClientException { return fullSync ? freeIpaUsersStateProvider.getUsersState(freeIpaClient) : freeIpaUsersStateProvider.getFilteredFreeIpaState( freeIpaClient, umsUsersState.getRequestedWorkloadUsernames()); }  Operation synchronizeUsers(String accountId, String actorCrn, Set<String> environmentCrnFilter,
            Set<String> userCrnFilter, Set<String> machineUserCrnFilter); Operation synchronizeUsersWithCustomPermissionCheck(String accountId, String actorCrn, Set<String> environmentCrnFilter,
            UserSyncRequestFilter userSyncFilter, AuthorizationResourceAction action);  }### Answer:
@Test void testFullSyncRetrievesFullIpaState() throws Exception { FreeIpaClient freeIpaClient = mock(FreeIpaClient.class); UmsUsersState umsUsersState = mock(UmsUsersState.class); underTest.getIpaUserState(freeIpaClient, umsUsersState, true); verify(freeIpaUsersStateProvider).getUsersState(any()); }
@Test void testFilteredSyncRetrievesFilteredIpaState() throws Exception { FreeIpaClient freeIpaClient = mock(FreeIpaClient.class); UmsUsersState umsUsersState = mock(UmsUsersState.class); ImmutableSet<String> workloadUsers = mock(ImmutableSet.class); when(umsUsersState.getRequestedWorkloadUsernames()).thenReturn(workloadUsers); underTest.getIpaUserState(freeIpaClient, umsUsersState, false); verify(freeIpaUsersStateProvider).getFilteredFreeIpaState(any(), eq(workloadUsers)); }