### Question:
LegacyTaglibFunctions { public static String[] split( @Nullable String input, @Nullable String delimiters) { final String[] array; if (input == null || input.isEmpty()) { return new String[] {""}; } if (delimiters == null) { return new String[] {input}; } final StringTokenizer tok = new StringTokenizer(input, delimiters); final int count = tok.countTokens(); array = new String[count]; int i = 0; while (tok.hasMoreTokens()) { array[i] = tok.nextToken(); i++; } return array; }  static String toUpperCase(@Nullable final String input); static String toLowerCase(@Nullable final String input); static int indexOf(@Nullable String input, @Nullable String substring); static boolean contains(@Nullable final String input, @Nullable final String substring); static boolean containsIgnoreCase(@Nullable String input, @Nullable String substring); static boolean startsWith(@Nullable String input, @Nullable String substring); static boolean endsWith(@Nullable String input, @Nullable String substring); static String substring(@Nullable String input, int beginIndex, int endIndex); static String substringAfter(@Nullable String input, @Nullable String substring); static String substringBefore(@Nullable String input, @Nullable String substring); static String trim(@Nullable final String input); static String replace(
            @Nullable String input,
            @Nullable String substringBefore,
            final String substringAfter); static String[] split(
            @Nullable String input,
            @Nullable String delimiters); static int length(@Nullable final Object obj); static String join(@Nullable final String[] array, @Nullable String separator);  }### Answer:
@Test public void testSplit() { assertThat(split(null, null)).containsExactly(""); assertThat(split("", null)).containsExactly(""); assertThat(split("foo", null)).containsExactly("foo"); assertThat(split(null, "")).containsExactly(""); assertThat(split("foo", "")).containsExactly("foo"); assertThat(split("", "")).containsExactly(""); assertThat(split("", "x")).containsExactly(""); assertThat(split("ooo", "o")).isEmpty(); assertThat(split("foo, bar", ",")).containsExactly("foo", " bar"); assertThat(split(",foo,", ",")).containsExactly("foo"); }