### Question:
SimpleNumber implements Rollup { @Override public boolean equals(Object obj) { if (obj == null || !(obj instanceof SimpleNumber)) return false; SimpleNumber other = (SimpleNumber)obj; return other.value == this.value || other.value.equals(this.value); } SimpleNumber(Object value); @Override Boolean hasData(); Number getValue(); Type getDataType(); String toString(); @Override RollupType getRollupType(); @Override int hashCode(); @Override boolean equals(Object obj);  }### Answer:
@Test public void equalsWithNullReturnsFalse() { SimpleNumber sn = new SimpleNumber(123.45d); assertFalse(sn.equals(null)); }
@Test public void equalsWithOtherTypeReturnsFalse() { SimpleNumber sn = new SimpleNumber(123.45d); assertFalse(sn.equals(Double.valueOf(123.45d))); }
@Test public void equalsWithSimpleNumberOfOtherTypeReturnsFalse() { SimpleNumber sn = new SimpleNumber(123); SimpleNumber other = new SimpleNumber(123L); assertFalse(sn.equals(other)); }
@Test public void equalsWithSimpleNumberOfSameTypeReturnsTrue() { SimpleNumber sn = new SimpleNumber(123); SimpleNumber other = new SimpleNumber(123); assertTrue(sn.equals(other)); }
@Test public void equalsWithSimpleNumberOfSameBoxedValueReturnsTrue() { Integer value = 123; SimpleNumber sn = new SimpleNumber(value); SimpleNumber other = new SimpleNumber(value); assertTrue(sn.equals(other)); }