Added expandExpectedTextInput() and unit tests.
Have not integrated this functionality yet.