### Question:
StringUtil { public static final String concat(Object ... value ) { if ( value == null ) { return null; } if ( value.length == 1 ) { if ( value[0] == null ) return Constant.EMPTY; return value[0].toString(); } if ( value.length == 2 ) { if ( value[0] == null ) value[0] = Constant.EMPTY; if ( value[1] == null ) value[1] = Constant.EMPTY; return value[0].toString().concat(value[1].toString()); } if ( value.length > 2 ) { int length = 0; String[] strs = new String[value.length]; for ( int i=0; i<value.length; i++ ) { if ( value[i] != null ) { strs[i] = value[i].toString(); length += strs[i].length(); } } StringBuilder buf = new StringBuilder(length); for ( String v : strs ) { if ( v != null ) buf.append(v); } return buf.toString(); } return Constant.EMPTY; }  static final String substring(String line, String start, String end); static final String substringR(String line, String start, String end); static final String concat(Object ... value ); static final int toInt(String str, int defaultValue); static final float toFloat(String str, float defaultValue); static final boolean checkNotEmpty(String str); static final void padStringRight(StringBuilder buf, String str, int length); static final String bytesToHexString(byte[] bytes); static final byte[] hexStringToBytes(String hexString); static final String[] splitMachineId(String machineId); static final Locale parseLocale(String languageTag, Locale defaultLocale); static final boolean checkValidEmail(String emailAddress); static String encryptSHA1(String data); static String encryptMD5(String data);  }### Answer:
@Test public void testConcat1() { String actual = StringUtil.concat("a", "b", "c", "d"); assertEquals("abcd", actual); }
@Test public void testConcat2() { String actual = StringUtil.concat("a", null, "c", "d"); assertEquals("acd", actual); }
@Test public void testConcat3() { String actual = StringUtil.concat("a"); assertEquals("a", actual); }
@Test public void testConcat4() { String actual = StringUtil.concat("a", "b"); assertEquals("ab", actual); }
@Test public void testConcat5() { String actual = StringUtil.concat(null); assertEquals(null, actual); }
@Test public void testConcat6() { String actual = StringUtil.concat(null, "Hello"); assertEquals("Hello", actual); }
@Test public void testConcat7() { String actual = StringUtil.concat(null, null); assertEquals("", actual); }
@Test public void testConcat8() { String actual = StringUtil.concat(null, null, null); assertEquals("", actual); }
@Test public void testConcat9() { String actual = StringUtil.concat(null, null, null, "hello"); assertEquals("hello", actual); }