StringBuilderUtils { public static boolean isEmpty(@NonNull StringBuilder stringBuilder) { return stringBuilder.length() == 0; }  static void replace(@NonNull StringBuilder stringBuilder,
                        @NonNull String toReplace,
                        @NonNull String replacement); static void trim(@NonNull StringBuilder stringBuilder); static boolean isEmpty(@NonNull StringBuilder stringBuilder); static boolean startsWith(@NonNull StringBuilder stringBuilder, @NonNull String start); static boolean contains(@NonNull StringBuilder stringBuilder, @NonNull String contains); static boolean equals(@NonNull StringBuilder stringBuilder, @NonNull String equal); @NonNull static StringBuilder substring(@NonNull StringBuilder stringBuilder, int start, int end);  }
@Test public void isEmpty_HasNoCharacters() { StringBuilder stringBuilder = new StringBuilder(""); Assert.assertTrue(StringBuilderUtils.isEmpty(stringBuilder)); }
@Test public void isEmpty_HasCharacters() { StringBuilder stringBuilder = new StringBuilder("abcdefg"); Assert.assertFalse(StringBuilderUtils.isEmpty(stringBuilder)); StringBuilder stringBuilder1 = new StringBuilder(" "); Assert.assertFalse(StringBuilderUtils.isEmpty(stringBuilder1)); }