SimpleIntent extends BaseIntent<SimpleIntent> { @Override protected boolean onStartWith(@NonNull final IntentStarter starter, @NonNull final Intent intent) { if (forResult) { starter.startIntentForResult(intent, requestCode); } else { starter.startIntent(intent); } return true; }  SimpleIntent activityClass(@NonNull final Class<? extends Activity> activityClass); @Nullable Class<? extends Activity> activityClass(); SimpleIntent action(@NonNull final String action); @NonNull String action(); SimpleIntent flags(@IntRange(from = 0, to = Integer.MAX_VALUE) final int flags); SimpleIntent flag(@IntRange(from = 1, to = Integer.MAX_VALUE) final int flag); @IntRange(from = 0, to = Integer.MAX_VALUE) int flags(); SimpleIntent requestCode(final int requestCode); int requestCode();  }
@Test public void testOnStartWith() { final SimpleIntent simpleIntent = new SimpleIntent(); simpleIntent.activityClass(TestActivity.class); final Intent intent = simpleIntent.build(context); final IntentStarter mockStarter = mock(IntentStarter.class); assertThat(simpleIntent.onStartWith(mockStarter, intent), is(true)); verify(mockStarter).startIntent(intent); }