public static String convertToString(String[] value) {
        if (value == null || value.length == 0) {
            return null;
        }

        StringBuffer result = new StringBuffer(String.valueOf(value[0]));
        for (int i = 1; i < value.length; i++) {
            result.append(",").append(value[i]);
        }

        return result.toString();
    }
@Test
    public void testConvertToString() throws Exception {
        assertEquals(null, StringArrayConverter.convertToString(null));
        assertEquals(null, StringArrayConverter.convertToString(new String[]{}));
        assertEquals("", StringArrayConverter.convertToString(new String[]{""}));
        assertEquals("foo", StringArrayConverter.convertToString(new String[]{"foo"}));
        assertEquals("foo,bar", StringArrayConverter.convertToString(new String[]{"foo", "bar"}));
        assertEquals("foo,bar,baz", StringArrayConverter.convertToString(new String[]{"foo", "bar", "baz"}));
    }