diff --git a/src/test/java/io/usethesource/capsule/AbstractMapProperties.java b/src/test/java/io/usethesource/capsule/AbstractMapProperties.java index 1183c98..037d6c5 100644 --- a/src/test/java/io/usethesource/capsule/AbstractMapProperties.java +++ b/src/test/java/io/usethesource/capsule/AbstractMapProperties.java @@ -13,6 +13,7 @@ import java.io.ObjectInputStream; import java.io.ObjectOutputStream; import java.io.Serializable; +import java.util.HashMap; import java.util.HashSet; import java.util.Objects; @@ -27,6 +28,22 @@ */ public abstract class AbstractMapProperties> { + @Property(trials = DEFAULT_TRIALS) + public void convertToJavaMapAndCheckSize(CT input) { + assertEquals(new HashMap(input).size(), input.size()); + } + + @Property(trials = DEFAULT_TRIALS) + public void convertToJavaMapAndCheckHashCode(CT input) { + assertEquals(new HashMap(input).hashCode(), input.hashCode()); + } + + @Property(trials = DEFAULT_TRIALS) + public void convertToJavaMapAndCheckEquality(CT input) { + assertEquals("input.equals(convertToJavaSet)", input, new HashMap(input)); + assertEquals("convertToJavaSet.equals(input)", new HashMap(input), input); + } + @Property(trials = DEFAULT_TRIALS) public void serializationRoundtrip(CT input) throws Exception { assertEquals(input, deserialize(serialize((Serializable) input), input.getClass()));