@Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

        // Sets the listener for the button.
        findViewById(R.id.button).setOnClickListener(this);

        // Get references to the EditText and views showing the result.
        mInputText = (EditText) findViewById(R.id.editText);
        mSuccessView = findViewById(R.id.inputValidationSuccess);
        mErrorView = findViewById(R.id.inputValidationError);
    }
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