### Question:
Strings { @SuppressWarnings({"StringEquality", "SimplifiableIfStatement"}) public static boolean eq(final String str1, final String str2) { if (str1 == str2) return true; if (str1 == null || str2 == null) return false; return str1.equals(str2); }  @SuppressWarnings({"StringEquality", "SimplifiableIfStatement"}) static boolean eq(final String str1, final String str2); @SuppressWarnings({"StringEquality", "SimplifiableIfStatement"}) static boolean eq(final String str1, final String str2, final boolean caseSensitive); @NotNull static String ensureStartsWith(@NotNull final String str, final char c); @NotNull static String ensureEndsWith(@NotNull final String str, final char c); @NotNull static String removeEnding(@NotNull final String str, @NotNull final String ending); @NotNull static String rtrim(@NotNull final String str); @NotNull static String replace(@NotNull final String where, @NotNull final String what, @NotNull final String with); @NotNull static String repeat(@NotNull final String what, @Nullable final String delimiter, int count); @Contract("null,_->false") static boolean matches(@Nullable final CharSequence string, @NotNull final Pattern pattern); @Contract("null,_,_->false") static boolean matches(@Nullable final CharSequence string, @NotNull final String pattern, boolean caseSensitive); @Contract("!null->!null; null->null") static String upper(@Nullable final String string); @Contract("!null->!null; null->null") static String lower(@Nullable final String string); @Contract("!null->!null; null->null") static String minimizeSpaces(@Nullable final String string); @Contract("!null,_->!null; null,_->null") static String lastPart(@Nullable final String string, final char delimiter);  }### Answer:
@Test public void eq_eq() { boolean ok = eq("A" + "BC", "AB" + "C"); assertThat(ok).isTrue(); }
@Test public void eq_not_eq() { boolean ok = eq("XXX", "YYY"); assertThat(ok).isFalse(); }
@Test public void eq_nulls() { boolean ok = eq(null, null); assertThat(ok).isTrue(); }
@Test public void eq_null_1() { boolean ok = eq(null, "ZZZ"); assertThat(ok).isFalse(); }
@Test public void eq_null_2() { boolean ok = eq("ZZZ", null); assertThat(ok).isFalse(); }