public static Correspondence<Number, Number> tolerance(double tolerance) {
    return new TolerantNumericEquality(tolerance);
  }
@Test
  public void testTolerance_viaIterableSubjectContains_failure() {
    expectFailure
        .whenTesting()
        .that(ImmutableList.of(1.02, 2.04, 3.08))
        .comparingElementsUsing(tolerance(0.05))
        .contains(3.01);
    assertFailureKeys("expected to contain", "testing whether", "but was");
    assertFailureValue("expected to contain", "3.01");
    assertFailureValue(
        "testing whether", "actual element is a finite number within 0.05 of expected element");
    assertFailureValue("but was", "[1.02, 2.04, 3.08]");
  }