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 testSet() {
        Set<Object> set = new HashSet<>();
        set.add(null);
        assertEquals(set, CollectionUtils.set(null, null, null));
        assertEquals(new LinkedHashSet(Arrays.asList("", "a", "b")), CollectionUtils.set("", "a", "b"));
        assertEquals(new HashSet(), CollectionUtils.set());
    }