SimpleIntent extends BaseIntent<SimpleIntent> { public SimpleIntent action(@NonNull final String action) { this.action = action; this.type = TYPE_ACTION; 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 testAction() { final SimpleIntent intent = new SimpleIntent(); intent.action(Intent.ACTION_DIAL); assertThat(intent.action(), is(Intent.ACTION_DIAL)); }
@SuppressWarnings("ConstantConditions") @Test public void testBuildWithInvalidAction() { final SimpleIntent intent = new SimpleIntent(); intent.action(null); assertThatBuildThrowsExceptionWithMessage( context, intent, "No action specified." ); }