PmAttrLocalDateImpl extends PmAttrBase<LocalDate, LocalDate> implements PmAttrLocalDate { @Deprecated @Override public int compareTo(PmObject otherPm) { return CompareUtil.compare(getValue(), ((PmAttrLocalDate) otherPm).getValue()); } PmAttrLocalDateImpl(PmObject pmParent); @Deprecated @Override int compareTo(PmObject otherPm);  }
@SuppressWarnings("deprecation") @Test public void testLocalDateComparison() { PmAttrLocalDateImpl datePm1 = new PmAttrLocalDateImpl(conversation); datePm1.setValue(new LocalDate(2000, 1, 1)); PmAttrLocalDateImpl datePm2 = new PmAttrLocalDateImpl(conversation); datePm2.setValue(new LocalDate(2000, 2, 1)); PmAttrLocalDateImpl datePm3 = new PmAttrLocalDateImpl(conversation); datePm3.setValue(new LocalDate(2001, 1, 1)); PmAttrLocalDateImpl datePm4 = new PmAttrLocalDateImpl(conversation); datePm4.setValue(new LocalDate(2000, 1, 1)); assertEquals(datePm1.compareTo(datePm2), -1); assertEquals(datePm2.compareTo(datePm3), -1); assertEquals(datePm1.compareTo(datePm3), -1); assertEquals(datePm2.compareTo(datePm1), 1); assertEquals(datePm3.compareTo(datePm2), 1); assertEquals(datePm3.compareTo(datePm1), 1); assertEquals(datePm1.compareTo(datePm1), 0); assertEquals(datePm1.compareTo(datePm4), 0); }