PmAttrLocalDateTimeImpl extends PmAttrBase<LocalDateTime, LocalDateTime> implements PmAttrLocalDateTime { @Deprecated @Override public int compareTo(PmObject otherPm) { return CompareUtil.compare(getValue(), ((PmAttrLocalDateTime) otherPm).getValue()); } PmAttrLocalDateTimeImpl(PmObject pmParent); @Deprecated @Override int compareTo(PmObject otherPm);  }
@SuppressWarnings("deprecation") @Test public void testLocalDateComparison() { PmAttrLocalDateTimeImpl datePm1 = new PmAttrLocalDateTimeImpl(testPm); datePm1.setValue(new LocalDateTime(2000, 1, 1, 10, 0)); PmAttrLocalDateTimeImpl datePm2 = new PmAttrLocalDateTimeImpl(testPm); datePm2.setValue(new LocalDateTime(2000, 1, 1, 11, 0)); PmAttrLocalDateTimeImpl datePm3 = new PmAttrLocalDateTimeImpl(testPm); datePm3.setValue(new LocalDateTime(2001, 1, 1, 10, 0)); PmAttrLocalDateTimeImpl datePm4 = new PmAttrLocalDateTimeImpl(testPm); datePm4.setValue(new LocalDateTime(2000, 1, 1, 10, 0)); 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); }