### Question:
Gateway3DSecureActivity extends AppCompatActivity { void complete(String acsResult) { Intent intent = new Intent(); complete(acsResult, intent); }   static final String EXTRA_HTML; static final String EXTRA_TITLE; static final String EXTRA_ACS_RESULT; }### Answer:
@Test public void testCompleteWorksAsExpected() { String testAcsResult = "test result"; Intent testIntent = new Intent(); activity.complete(testAcsResult, testIntent); assertTrue(testIntent.hasExtra(Gateway3DSecureActivity.EXTRA_ACS_RESULT)); assertEquals(testAcsResult, testIntent.getStringExtra(Gateway3DSecureActivity.EXTRA_ACS_RESULT)); verify(activity).setResult(Activity.RESULT_OK, testIntent); verify(activity).finish(); }