Remove unnecessary test for `MapEntry::hashCode`
EqualsVerifier now ensures that implementations of `Map.Entry` honor
the contract of `hashCode`, so the test introduced in is
no longer needed.
@@ -16,11 +16,7 @@ import static org.assertj.core.api.Assertions.catchThrowable;
import static org.assertj.core.api.BDDAssertions.then;
import static org.assertj.core.data.MapEntry.entry;
-import java.util.Objects;
-
import org.junit.jupiter.api.Test;
-import org.junit.jupiter.params.ParameterizedTest;
-import org.junit.jupiter.params.provider.CsvSource;
import nl.jqno.equalsverifier.EqualsVerifier;
@@ -36,23 +32,6 @@ class MapEntry_Test {
.verify();
}
- @ParameterizedTest
- @CsvSource({
- "name, Yoda",
- " , Yoda",
- "name, ",
- " , ",
- })
- void should_honor_Entry_hashCode_contract(String key, String value) {
- // GIVEN
- MapEntry<String, String> underTest = entry(key, value);
- int expected = Objects.hashCode(key) ^ Objects.hashCode(value);
- // WHEN
- int result = underTest.hashCode();
- // THEN
- then(result).isEqualTo(expected);
- }
-
@Test
void setValue_should_fail() {
// GIVEN
