public void isPresent() {
    if (actual == null) {
      failWithActual(simpleFact("expected present optional"));
    } else if (!actual.isPresent()) {
      failWithoutActual(simpleFact("expected to be present"));
    }
  }
@Test
  public void isPresent() {
    assertThat(Optional.of("foo")).isPresent();
  }