@@ -0,0 +1,2736 @@
+package nl.jqno.equalsverifier.integration.extended_contract;%0A%0Aimport nl.jqno.equalsverifier.EqualsVerifier;%0Aimport nl.jqno.equalsverifier.internal.testhelpers.ExpectedException;%0Aimport org.junit.jupiter.api.Test;%0A%0Aimport java.util.Map;%0Aimport java.util.Objects;%0A%0Aclass MapEntrySubclassTest %7B%0A%0A    @Test%0A    void fails_whenMapEntryHashCodeContractIsNotHonored() %7B%0A        ExpectedException%0A                .when(() -%3E EqualsVerifier.forClass(HashCodeContractNotHonored.class).verify())%0A                .assertFailure()%0A                .assertMessageContains(%22FIXME%22); // FIXME%0A    %7D%0A%0A    @Test%0A    void succeeds_whenMapEntryHashCodeContractIsHonored() %7B%0A        EqualsVerifier.forClass(HashCodeContractHonored.class).verify();%0A    %7D%0A%0A    static final class HashCodeContractNotHonored%3CK, V%3E implements Map.Entry%3CK, V%3E %7B%0A%0A        private final K key;%0A        private final V value;%0A%0A        HashCodeContractNotHonored(K key, V value) %7B%0A            this.key   = key;%0A            this.value = value;%0A        %7D%0A%0A        @Override%0A        public boolean equals(Object obj) %7B%0A            if (!(obj instanceof Map.Entry)) %7B%0A                return false;%0A            %7D%0A            Map.Entry%3C?,?%3E other = (Map.Entry%3C?,?%3E)obj;%0A            return Objects.equals(key, other.getKey()) && Objects.equals(value, other.getValue());%0A        %7D%0A%0A        @Override%0A        public int hashCode() %7B%0A            return Objects.hash(key, value);%0A        %7D%0A%0A        @Override%0A        public K getKey() %7B%0A            return key;%0A        %7D%0A%0A        @Override%0A        public V getValue() %7B%0A            return value;%0A        %7D%0A%0A        @Override%0A        public V setValue(V value) %7B%0A            throw new UnsupportedOperationException();%0A        %7D%0A%0A    %7D%0A%0A    static final class HashCodeContractHonored%3CK, V%3E implements Map.Entry%3CK, V%3E %7B%0A%0A        private final K key;%0A        private final V value;%0A%0A        HashCodeContractHonored(K key, V value) %7B%0A            this.key   = key;%0A            this.value = value;%0A        %7D%0A%0A        @Override%0A        public boolean equals(Object obj) %7B%0A            if (!(obj instanceof Map.Entry)) %7B%0A                return false;%0A            %7D%0A            Map.Entry%3C?,?%3E other = (Map.Entry%3C?,?%3E)obj;%0A            return Objects.equals(key, other.getKey()) && Objects.equals(value, other.getValue());%0A        %7D%0A%0A        @Override%0A        public int hashCode() %7B%0A            return Objects.hashCode(key) %5E Objects.hashCode(value);%0A        %7D%0A%0A        @Override%0A        public K getKey() %7B%0A            return key;%0A        %7D%0A%0A        @Override%0A        public V getValue() %7B%0A            return value;%0A        %7D%0A%0A        @Override%0A        public V setValue(V value) %7B%0A            throw new UnsupportedOperationException();%0A        %7D%0A%0A    %7D%0A%0A%7D

Add tests for `Map.Entry` `hashCode` contract verification