public static <T> List<T> list(T... elements) {
        if (elements == null) {
            throw new IllegalArgumentException("Expected an array of elements (or empty array) but received a null.");
        }
        ArrayList<T> list = new ArrayList<>(elements.length);
        Collections.addAll(list, elements);
        return list;
    }
@Test
    void testList() {
        assertEquals(Arrays.asList(null, null, null), CollectionUtils.list(null, null, null));
        assertEquals(Arrays.asList("", "a", "b"), CollectionUtils.list("", "a", "b"));
        assertEquals(new ArrayList(), CollectionUtils.list());
    }