### Question:
StringUtilities { public static int findLastWordPosition(String s) { int len = s.length(); int pos = -1; for (int i = len - 1; i >= 0; --i) { char c = s.charAt(i); if (!Character.isLetterOrDigit(c)) { pos = i + 1; break; } } if (pos >= len) { pos = -1; } return pos; } private  StringUtilities(); static boolean isControlCharacterOrBackslash(char c); static boolean isControlCharacterOrBackslash(int codePoint); static boolean isDoubleQuoted(String str); static String extractFromDoubleQuotes(String str); static boolean isDisplayable(int c); static boolean isAllBlank(CharSequence... sequences); static String characterToString(char c); static int countOccurrences(String string, char occur); static boolean equals(String s1, String s2, boolean caseSensitive); static boolean endsWithWhiteSpace(String string); static String toQuotedString(byte[] bytes); static String toQuotedString(byte[] bytes, int charSize); static boolean startsWithIgnoreCase(String string, String prefix); static boolean endsWithIgnoreCase(String string, String postfix); static boolean containsAll(CharSequence toSearch, CharSequence... searches); static boolean containsAllIgnoreCase(CharSequence toSearch, CharSequence... searches); static boolean containsAnyIgnoreCase(CharSequence toSearch, CharSequence... searches); static int indexOfWord(String text, String searchWord); static boolean isWholeWord(String text, int startIndex, int length); static String convertTabsToSpaces(String str); static String convertTabsToSpaces(String str, int tabSize); static String[] toLines(String str); static String[] toLines(String s, boolean preserveTokens); static String toFixedSize(String s, char pad, int size); static String pad(String source, char filler, int length); static String indentLines(String s, String indent); static String findWord(String s, int index); static String findWord(String s, int index, char[] charsToAllow); static WordLocation findWordLocation(String s, int index, char[] charsToAllow); static boolean isWordChar(char c, char[] charsToAllow); static int findLastWordPosition(String s); static String getLastWord(String s, String separator); static String toString(int value); static String toStingJson(Object o); static String toStringWithIndent(Object o); static String mergeStrings(String string1, String string2); static String trim(String original, int max); static String trimTrailingNulls(String s); static String trimMiddle(String s, int max); static String fixMultipleAsterisks(String value); static boolean isValidCLanguageChar(char c); static boolean isAsciiChar(char c); static boolean isAsciiChar(int codePoint); static String convertEscapeSequences(String str); static String convertControlCharsToEscapeSequences(String str); static String convertCodePointToEscapeSequence(int codePoint); static final Pattern DOUBLE_QUOTED_STRING_PATTERN; final static String LINE_SEPARATOR; static final int UNICODE_REPLACEMENT; static final int UNICODE_BE_BYTE_ORDER_MARK; static final int UNICODE_LE16_BYTE_ORDER_MARK; static final int UNICODE_LE32_BYTE_ORDER_MARK; static final int DEFAULT_TAB_SIZE; }### Answer:
@Test public void testFindLastWordPosition() { String testString = "This is a test String"; assertEquals(15, findLastWordPosition(testString)); }