@Override
  public final void isEqualTo(@Nullable Object other) {
    if (Objects.equal(actual, other)) {
      return;
    }

    // Fail but with a more descriptive message:

    if (actual == null || !(other instanceof Map)) {
      super.isEqualTo(other);
      return;
    }

    containsEntriesInAnyOrder((Map<?, ?>) other, /* allowUnexpected= */ false);
  }
@Test
  public void isEqualToFailureExtraMissingAndDiffering() {
    ImmutableMap<String, Integer> actual = ImmutableMap.of("jan", 1, "feb", 2, "march", 3);
    ImmutableMap<String, Integer> expectedMap = ImmutableMap.of("jan", 1, "april", 4, "march", 5);

    expectFailureWhenTestingThat(actual).isEqualTo(expectedMap);
    assertFailureKeys(
        "keys with wrong values",
        "for key",
        "expected value",
        "but got value",
        "missing keys",
        "for key",
        "expected value",
        "unexpected keys",
        "for key",
        "unexpected value",
        "---",
        "expected",
        "but was");
    assertFailureValueIndexed("for key", 0, "march");
    assertFailureValueIndexed("expected value", 0, "5");
    assertFailureValue("but got value", "3");
    assertFailureValueIndexed("for key", 1, "april");
    assertFailureValueIndexed("expected value", 1, "4");
    assertFailureValueIndexed("for key", 2, "feb");
    assertFailureValue("unexpected value", "2");
    assertFailureValue("expected", "{jan=1, april=4, march=5}");
    assertFailureValue("but was", "{jan=1, feb=2, march=3}");
  }