@Override
    public void onClick(View view) {
        if (view.getId() == R.id.button) {
            // The View to display depends on whether the input is valid or not.
            final String inputText = mInputText.getText().toString();

            // Validate the input and show the result.
            showResult(validateText(inputText));
        }
    }
Asks the user for a coffee preparation and shows if it is valid.
<p>Valid inputs are anything ending in "coffee" or strings listed in
{@link MainActivity#COFFEE_PREPARATIONS} The check is always case-insensitive.
</p>
ui/espresso/CustomMatcherSample/app/src/main/java/com/example/android/testing/espresso/CustomMatcherSample/MainActivity.java