### Question:
StringUtil { @NonNull public static CharSequence strip(@Nullable CharSequence str) { if (str == null || str.length() == 0) { return ""; } int len = str.length(); int start = 0; int end = len - 1; while (start < len && Character.isWhitespace(str.charAt(start))) { start++; } while (end > 0 && Character.isWhitespace(str.charAt(end))) { end--; } if (end > start) { return str.subSequence(start, end + 1); } return ""; } private  StringUtil(); @NonNull static String listToCsv(@NonNull List<String> list); @NonNull static List<String> csvToList(@NonNull String csv); @NonNull static List<String> delimiterStringToList(@NonNull String delimitedString,
                                                     @NonNull String delimiter); @NonNull static String md5string(@NonNull String s); @NonNull static CharSequence strip(@Nullable CharSequence str); @NonNull static String intToHexStr(int i); static String addUnderscores(@NonNull String text); static String removeUnderscores(@NonNull String text); static boolean hasSectionAnchor(@NonNull String text); static String removeSectionAnchor(String text); static String removeNamespace(@NonNull String text); static String removeHTMLTags(@NonNull String text); static String sanitizeText(@NonNull String selectedText); static boolean normalizedEquals(@Nullable String str1, @Nullable String str2); @NonNull static Spanned fromHtml(@Nullable String source); @NonNull static SpannableStringBuilder boldenSubstrings(@NonNull String text, @NonNull List<String> subStrings); static void highlightEditText(@NonNull EditText editText, @NonNull String parentText, @NonNull String highlightText); static void boldenKeywordText(@NonNull TextView textView, @NonNull String parentText, @Nullable String searchQuery); @NonNull static String getBase26String(@IntRange(from = 1) int number); @NonNull static String listToJsonArrayString(@NonNull List<String> list); static String stringToListMapToJSONString(@Nullable Map<String, List<Integer>> map); static String listToJSONString(@Nullable List<Integer> list);  }### Answer:
@Test public void testStrip() { assertThat(StringUtil.strip("test"), is("test")); assertThat(StringUtil.strip(" test "), is("test")); }