protected List<T> getEntities(
		@Nonnull final EntityProvider<T, ?> entities,
		@Nullable final Pageable pageable,
		@Nullable final Class<T> clazz,
		@Nullable final Sort sort)
	{
		Objects.requireNonNull(entities);
		
		Stream<? extends T> entityStream = entities
			.stream()
			.filter(this.criteria::evaluate);
		
		final Sort sortToUse = this.staticSort.orElse(sort);
		if(sortToUse != null)
		{
			entityStream = EntitySorter.sortEntitiesStream(clazz, sortToUse, entityStream);
		}
		
		entityStream = this.pageEntityStream(pageable, entityStream);
		
		final List<T> result = this.copyEntities(entityStream);
		
		if(LOG.isTraceEnabled())
		{
			LOG.trace("Found {} entries.", result.size());
		}
		return result;
	}
@Test
	void getEntities_EmptyCriteria_NoPageable_Sortable_IsSortedByLastName()
	{
		final PageableSortableCollectionQuerier<Customer> querier = new PageableSortableCollectionQuerier<>(
			new DummyWorkingCopier<>(),
			new CriteriaSingleNode<>()
		);
		final List<Customer> sortedCustomers =
			querier.getEntities(DATA_CUSTOMERS_DABC_ABCD, Pageable.unpaged(), Customer.class, Sort.by("lastName"));
		Assertions.assertEquals("A", sortedCustomers.get(0).lastName);
		Assertions.assertEquals("B", sortedCustomers.get(1).lastName);
		Assertions.assertEquals("C", sortedCustomers.get(2).lastName);
		Assertions.assertEquals("D", sortedCustomers.get(3).lastName);
	}