public Page<Organization> searchAllOrganizations(Organization org, int pageIndex, int pageSize) {
        OrganizationRole orgRole = org.getOrganizationRoles().isEmpty() ? new OrganizationRole() : org.getOrganizationRoles().get(0);
        return organizationRepository.searchAll(org, orgRole, PageRequest.of(pageIndex, pageSize));
    }
@Test
    public void searchAllOrganizations() {
        when(repositoryMock.searchAll(any(Organization.class), any(OrganizationRole.class), any(Pageable.class))).thenReturn(getPageOrganizations());

        Page<Organization> result = organizationServiceMock.searchAllOrganizations(newOrganization(), 1, 10);

        verify(repositoryMock, times(1)).searchAll(any(Organization.class), any(OrganizationRole.class), any(Pageable.class));
        assertNotNull(result);
    }