### Question:
TimePeriodValue implements Cloneable, Serializable { @Override public boolean equals(Object obj) { if (this == obj) { return true; } if (!(obj instanceof TimePeriodValue)) { return false; } TimePeriodValue timePeriodValue = (TimePeriodValue) obj; if (this.period != null ? !this.period.equals(timePeriodValue.period) : timePeriodValue.period != null) { return false; } if (this.value != null ? !this.value.equals(timePeriodValue.value) : timePeriodValue.value != null) { return false; } return true; } TimePeriodValue(TimePeriod period, Number value);  TimePeriodValue(TimePeriod period, double value); TimePeriod getPeriod(); Number getValue(); void setValue(Number value); @Override boolean equals(Object obj); @Override int hashCode(); @Override Object clone(); @Override String toString();  }### Answer:
@Test public void testEquals() { TimePeriodValue tpv1 = new TimePeriodValue(new Day(30, 7, 2003), 55.75); TimePeriodValue tpv2 = new TimePeriodValue(new Day(30, 7, 2003), 55.75); assertEquals(tpv1, tpv2); assertEquals(tpv2, tpv1); }