Merge "Introduce a utility method to test IME APIs."