public static <T> Set<T> set(T... elements) {
        if (elements == null) {
            throw new IllegalArgumentException("Expected an array of elements (or empty array) but received a null.");
        } else {
            return new LinkedHashSet<>(Arrays.asList(elements));
        }
    }
@Test
    void testSetNullPointerException() {
        assertThrows(IllegalArgumentException.class, () -> {
            CollectionUtils.set(null);
        });
    }