WikiSite implements Parcelable { @NonNull public String scheme() { return TextUtils.isEmpty(uri.getScheme()) ? DEFAULT_SCHEME : uri.getScheme(); } WikiSite(@NonNull Uri uri);  WikiSite(@NonNull String url);  WikiSite(@NonNull String authority, @NonNull String languageCode); protected  WikiSite(@NonNull Parcel in); static boolean supportedAuthority(@NonNull String authority); static void setDefaultBaseUrl(@NonNull String url); static WikiSite forLanguageCode(@NonNull String languageCode); @NonNull String scheme(); @NonNull String authority(); @NonNull String mobileAuthority(); String mobileUrl(); @NonNull String desktopAuthority(); @NonNull String subdomain(); @NonNull String path(@NonNull String segment); @NonNull Uri uri(); @NonNull String url(); @NonNull String url(@NonNull String segment); @NonNull String languageCode(); PageTitle titleForInternalLink(String internalLink); PageTitle titleForUri(Uri uri); @NonNull String dbName(); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString(); @Override int describeContents(); @Override void writeToParcel(@NonNull Parcel dest, int flags); static final String DEFAULT_SCHEME; static final Parcelable.Creator<WikiSite> CREATOR; }
@Test public void testCtorScheme() { WikiSite subject = new WikiSite("http: assertThat(subject.scheme(), is("http")); }
@Test public void testCtorDefaultScheme() { WikiSite subject = new WikiSite("wikipedia.org"); assertThat(subject.scheme(), is("https")); }