@Test
public void testEquals() {

    DecimalType dt1 = new DecimalType("142.8");
    DecimalType dt2 = new DecimalType("142.8");
    DecimalType dt3 = new DecimalType("99.7");
    PercentType pt = new PercentType("99.7");
    // Do not change to assertEquals(), because we want to check if .equals() works as expected!
    assertTrue(dt1.equals(dt2));
    assertFalse(dt1.equals(dt3));
    assertTrue(dt3.equals(pt));
    assertFalse(dt1.equals(pt));
}