@Test public void testGetExtraHtmlReturnsValueIfExists() { String expectedHtml = "<html></html>"; Intent testIntent = new Intent(); testIntent.putExtra(Gateway3DSecureActivity.EXTRA_HTML, expectedHtml); doReturn(testIntent).when(activity).getIntent(); String html = activity.getExtraHtml(); assertEquals(expectedHtml, html); }
String getExtraHtml() { Bundle extras = getIntent().getExtras(); if (extras != null) { return extras.getString(EXTRA_HTML); } return null; }
Gateway3DSecureActivity extends AppCompatActivity { String getExtraHtml() { Bundle extras = getIntent().getExtras(); if (extras != null) { return extras.getString(EXTRA_HTML); } return null; } }
Gateway3DSecureActivity extends AppCompatActivity { String getExtraHtml() { Bundle extras = getIntent().getExtras(); if (extras != null) { return extras.getString(EXTRA_HTML); } return null; }  }
Gateway3DSecureActivity extends AppCompatActivity { String getExtraHtml() { Bundle extras = getIntent().getExtras(); if (extras != null) { return extras.getString(EXTRA_HTML); } return null; }   }
Gateway3DSecureActivity extends AppCompatActivity { String getExtraHtml() { Bundle extras = getIntent().getExtras(); if (extras != null) { return extras.getString(EXTRA_HTML); } return null; }   static final String EXTRA_HTML; static final String EXTRA_TITLE; static final String EXTRA_ACS_RESULT; }