static List<String> splitByComma(String string) {
        if (string == null) {
            return Collections.emptyList();
        }
        return asList(string.trim().split("\\s*,\\s*"));
    }
@Test
    public void splitByCommaTest() {
        assertEquals(asList("project1", "project2"), splitByComma("project1,project2"));
        assertEquals(asList("project1", "project2"), splitByComma("    project1 ,  project2 "));
        assertEquals(asList("project1"), splitByComma("project1"));
        assertEquals(emptyList(), splitByComma(null));
    }