private static String urlFromIntent(@NonNull Intent intent) {
        checkNotNull(intent, "Intent cannot be null!");
        String url = intent.getStringExtra(KEY_URL_TO_LOAD);
        return !TextUtils.isEmpty(url) ? url : WEB_FORM_URL;
    }
An {@link Activity} that gets a text string from the user and displays it back when the user
clicks on one of the two buttons. The first one shows it in the same activity and the second
one opens another activity and displays the message.
ui/espresso/WebBasicSample/app/src/main/java/com/example/android/testing/espresso/web/BasicSample/WebViewActivity.java