### Question:
AndroidBarcode { public void scan() { new IntentIntegrator(activity).initiateScan(); } AndroidBarcode(Activity activity); void scan(); static final String SCAN_INTENT; }### Answer:
@Test public void shouldStartScanActivity(){ AndroidBarcode barcode = new AndroidBarcode(activity); barcode.scan(); Intent intent = getShadowApplication().getNextStartedActivity(); assertThat(intent.getComponent().getClassName(), is(CaptureActivity.class.getName())); }