### Question:
BlockDuration { @Override public int hashCode() { return Objects.hash(duration); } BlockDuration(long duration);  BlockDuration(BigInteger duration); long getDuration(); String toString(); @Override boolean equals(Object o); @Override int hashCode();  }### Answer:
@Test void shouldEquals() { BlockDuration blockDuration1 = new BlockDuration(BigInteger.valueOf(10)); BlockDuration blockDuration2 = new BlockDuration(BigInteger.valueOf(10)); BlockDuration blockDuration3 = new BlockDuration(BigInteger.valueOf(30)); Assertions.assertEquals(blockDuration2, blockDuration1); Assertions.assertNotEquals(blockDuration3, blockDuration1); Assertions.assertEquals(blockDuration1, blockDuration2); Assertions.assertNotEquals(blockDuration1, blockDuration3); Assertions.assertNotEquals(BigInteger.valueOf(30), blockDuration3); Assertions.assertNotEquals(blockDuration3, BigInteger.valueOf(30)); Assertions.assertEquals(41, blockDuration1.hashCode()); }