FullScreenAdapter extends MediaDisplayAdapter { @Override public void onDisplay(@NonNull Context context, @NonNull DisplayHandler displayHandler) { Intent intent = new Intent(context, FullScreenActivity.class) .setFlags(Intent.FLAG_ACTIVITY_NEW_TASK) .putExtra(FullScreenActivity.DISPLAY_HANDLER_EXTRA_KEY, displayHandler) .putExtra(FullScreenActivity.IN_APP_MESSAGE_KEY, getMessage()) .putExtra(FullScreenActivity.IN_APP_ASSETS, getAssets()); context.startActivity(intent); } protected  FullScreenAdapter(@NonNull InAppMessage message, @NonNull FullScreenDisplayContent displayContent); @NonNull static FullScreenAdapter newAdapter(@NonNull InAppMessage message); @Override void onDisplay(@NonNull Context context, @NonNull DisplayHandler displayHandler);  }
@Test public void testDisplay() { Context context = mock(Context.class); adapter.onDisplay(context, displayHandler); verify(context).startActivity(Mockito.argThat(new ArgumentMatcher<Intent>() { @Override public boolean matches(Intent argument) { if (!displayHandler.equals(argument.getParcelableExtra(FullScreenActivity.DISPLAY_HANDLER_EXTRA_KEY))) { return false; } if (!message.equals(argument.getParcelableExtra(FullScreenActivity.IN_APP_MESSAGE_KEY))) { return false; } if (!argument.getComponent().getClassName().equals(FullScreenActivity.class.getName())) { return false; } return true; } })); }