add unit tests to TextController