class CollectionFunctions {

    public static <T> T simpleFindFirstMandatory(Collection<T> list, Predicate<T> filterFn) {
        if (list == null || list.isEmpty()) {
            throw new IllegalArgumentException("Cannot find a mandatory matching value in an empty list");
        }
        return simpleFindFirst(list, filterFn).orElseThrow(() ->
                new IllegalArgumentException("Was unable to find a matching mandatory result in list"));
    }

    private  CollectionFunctions();

}