SimpleIntent extends BaseIntent<SimpleIntent> { public SimpleIntent flag(@IntRange(from = 1, to = Integer.MAX_VALUE) final int flag) { this.flags |= flag; return this; }  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 testFlag() { final SimpleIntent intent = new SimpleIntent(); intent.flags(Intent.FLAG_ACTIVITY_CLEAR_TASK | Intent.FLAG_ACTIVITY_NEW_TASK); intent.flag(Intent.FLAG_ACTIVITY_NO_ANIMATION); assertThat(intent.flags(), is(Intent.FLAG_ACTIVITY_CLEAR_TASK | Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_NO_ANIMATION)); }