Email { public Email body(String body) { if (body == null) throw new IllegalArgumentException("body == null"); this.body = body; return this; } Email(Context context); Email to(String... to); Email cc(String... cc); Email bcc(String... bcc); Email subject(String subject); Email body(String body); boolean send();  }
@Test public void body() { Context currentContext = mock(Context.class); ArgumentCaptor<Intent> argument = ArgumentCaptor.forClass(Intent.class); Shelly.email(currentContext) .body("body") .send(); verify(currentContext).startActivity(argument.capture()); Intent result = argument.getValue(); assertEquals("body", result.getStringExtra(Intent.EXTRA_TEXT)); }