public void updateHistory(View view) {
        // Get the text to add and timestamp.
        EditText editText = (EditText) view.getRootView().findViewById(R.id.editText);
        CharSequence textToAdd = editText.getText();
        long timestamp = System.currentTimeMillis();

        // Show it back to the user.
        appendEntryToView(textToAdd.toString(), timestamp);

        // Update the history.
        mLogHistory.addEntry(textToAdd.toString(), timestamp);

        // Reset the EditText.
        editText.setText("");
    }
Called when the user wants to append an entry to the history.
unit/BasicUnitAndroidTest/app/src/main/java/com/example/android/testing/unittesting/basicunitandroidtest/MainActivity.java