    @Test
    public void testFindTokenEnd() {


        // Cursor in first word, "Test"
        findTokenEndChecker(0, 4);
        findTokenEndChecker(1, 4);
        findTokenEndChecker(2, 4);
        findTokenEndChecker(3, 4);

        // Cursor at end of first word, space, and starting next word, "mentions"
        findTokenEndChecker(4, 4);
        findTokenEndChecker(5, 13);
        findTokenEndChecker(6, 13);

        // Cursor at end of second word, space, and starting third word, "Shoulong"
        findTokenEndChecker(13, 13);
        findTokenEndChecker(14, 22);
        findTokenEndChecker(15, 22);

        // Cursor at end of third word, space, and starting fourth word, "Li"
        findTokenEndChecker(22, 22);
        findTokenEndChecker(23, 25);
        findTokenEndChecker(24, 25);

        // Cursor at end of fourth word, space, and starting fifth word, "and"
        findTokenEndChecker(25, 25);
        findTokenEndChecker(26, 29);
        findTokenEndChecker(27, 29);

        // Set a test span in the editor around "Shoulong Li"
        setTestSpan("Shoulong Li", 14);

        // Cursor at end of first word, space, and starting next word, "mentions" (after adding span around "Shoulong Li")
        findTokenEndChecker(4, 4);
        findTokenEndChecker(5, 13);
        findTokenEndChecker(6, 13);

        // Cursor at end of second word, space, and starting third word, "Shoulong" (after adding span around "Shoulong Li")
        findTokenEndChecker(13, 13);
        findTokenEndChecker(14, 14);
        findTokenEndChecker(15, 22);

        // Before first '@' character
        findTokenEndChecker(30, 37);

        // After first '@' character
        findTokenEndChecker(31, 37);
        findTokenEndChecker(38, 40);

        // Before second '@' character
        findTokenEndChecker(41, 44);

        // After second '@' character
        findTokenEndChecker(42, 44);
        findTokenEndChecker(43, 44);
    }