### Question:
SimpleStringUtils { public static String shortString(String string, int max) { if (max==0){ return EMPTY; } if (string ==null){ return EMPTY; } if (string.length()<=max){ return string; } if (max==1){ return "."; } if (max==2){ return ".."; } if (max==3){ return "..."; } StringBuilder sb =new StringBuilder(); sb.append( string.substring(0, max-3)); sb.append("..."); return sb.toString(); }  static boolean equals(String text1, String text2); static String shortString(String string, int max);  }### Answer:
@Test public void short_string_null_1_returns_empty_string() { assertEquals("", SimpleStringUtils.shortString(null, 1)); }
@Test public void short_string_a_0_returns_empty_string() { assertEquals("", SimpleStringUtils.shortString("a", 0)); }
@Test public void short_string_a_1_returns_a_string() { assertEquals("a", SimpleStringUtils.shortString("a", 1)); }
@Test public void short_string_a_2_returns_a_string() { assertEquals("a", SimpleStringUtils.shortString("a", 2)); }
@Test public void short_string_12345678901_10_returns_1234567_dot_dot_dot_string() { assertEquals("1234567...", SimpleStringUtils.shortString("12345678901", 10)); }
@Test public void short_string_1234567890_10_returns_1234567890_string() { assertEquals("1234567890", SimpleStringUtils.shortString("1234567890", 10)); }