MwPageLead implements PageLead { @VisibleForTesting public Mobileview getMobileview() { return mobileview; }  @Override boolean hasError(); @Nullable MwServiceError getError(); void logError(String message); @Override Page toPage(@NonNull PageTitle title); String getLeadSectionContent(); @Nullable @Override String getTitlePronunciationUrl(); @VisibleForTesting Mobileview getMobileview();  }
@Test public void testEnglishMainPage() throws Exception { MwPageLead pageLead = gson.fromJson(wrapInMobileview(getEnglishMainPageJson()), MwPageLead.class); MwPageLead.Mobileview props = pageLead.getMobileview(); verifyEnglishMainPage(props); }
@Test public void testUnprotectedDisambiguationPage() throws Exception { MwPageLead pageLead = gson.fromJson(wrapInMobileview(getUnprotectedDisambiguationPageJson()), MwPageLead.class); MwPageLead.Mobileview props = pageLead.getMobileview(); verifyUnprotectedDisambiguationPage(props); }
@Test public void testProtectedButNoEditProtectionPage() throws Exception { MwPageLead pageLead = gson.fromJson(wrapInMobileview(getProtectedButNoEditProtectionPageJson()), MwPageLead.class); MwPageLead.Mobileview props = pageLead.getMobileview(); verifyProtectedNoEditProtectionPage(props); }
@Test public void testError() throws Exception { MwPageLead pageLead = gson.fromJson(getErrorJson(), MwPageLead.class); MwPageLead.Mobileview props = pageLead.getMobileview(); verifyError(pageLead, props); }