### Question:
PropertyUtils { public static String[] getArray(String key, String splitStr) { String value = getString(key); if (value == null || StringUtils.isEmpty(splitStr)) { return null; } try { return value.split(splitStr); } catch (PatternSyntaxException e) { logger.info(e.getMessage(),e); } return null; } private  PropertyUtils(); static String getString(String key); static String getString(String key, String defaultVal); static int getInt(String key); static int getInt(String key, int defaultValue); static Boolean getBoolean(String key); static long getLong(String key); static long getLong(String key, long defaultVal); static double getDouble(String key); static double getDouble(String key, double defaultVal); static String[] getArray(String key, String splitStr); static T getEnum(String key, Class<T> type,
                                         T defaultValue);  }### Answer:
@Test public void testGetArray() { String[] result = PropertyUtils.getArray("test.server.list", ","); assertEquals(result.length, 3); assertEquals(result[0], "xxx.xxx.test1"); assertEquals(result[1], "xxx.xxx.test2"); assertEquals(result[2], "xxx.xxx.test3"); result = PropertyUtils.getArray(null, ","); assertNull(result); result = PropertyUtils.getArray("abc", ","); assertNull(result); result = PropertyUtils.getArray("test.server.list", null); assertNull(result); }