public void isAbsent() {
    if (actual == null) {
      failWithActual(simpleFact("expected absent optional"));
    } else if (actual.isPresent()) {
      failWithoutActual(
          simpleFact("expected to be absent"), fact("but was present with value", actual.get()));
    }
  }
@Test
  public void isAbsentFailing() {
    expectFailureWhenTestingThat(Optional.of("foo")).isAbsent();
    assertFailureKeys("expected to be absent", "but was present with value");
    assertFailureValue("but was present with value", "foo");
  }