### Question:
LegacyTaglibFunctions { public static int indexOf(@Nullable String input, @Nullable String substring) { if (input == null) { input = ""; } if (substring == null) { substring = ""; } return input.indexOf(substring); }  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 testIndexOf() { assertThat(indexOf(null, null)).isEqualTo(0); assertThat(indexOf("", null)).isEqualTo(0); assertThat(indexOf("foo", null)).isEqualTo(0); assertThat(indexOf(null, "")).isEqualTo(0); assertThat(indexOf("o", "o")).isEqualTo(0); assertThat(indexOf("o", "")).isEqualTo(0); assertThat(indexOf("", "o")).isEqualTo(-1); assertThat(indexOf("foooo", "o")).isEqualTo(1); assertThat(indexOf("the foooo", "foo")).isEqualTo(4); }