class OrganisationServiceImpl implements OrganisationService {

    @Override
    public SortedSet<OrganisationResource> getAcademicOrganisations(SortedSet<OrganisationResource> organisations) {
        Comparator<OrganisationResource> compareById =
                Comparator.comparingLong(OrganisationResource::getId);
        Supplier<TreeSet<OrganisationResource>> supplier = () -> new TreeSet<>(compareById);
        ArrayList<OrganisationResource> organisationList = new ArrayList<>(organisations);

        return organisationList.stream()
                .filter(o -> OrganisationTypeEnum.RESEARCH.getId() == o.getOrganisationType())
                .collect(Collectors.toCollection(supplier));
    }

    public  OrganisationServiceImpl(OrganisationRestService organisationRestService,
                                   UserRestService userRestService, UserService userService);

}