@Test
public void testDeltaSince() {

    item.setState(new DecimalType(2012));
    DecimalType delta = PersistenceExtensions.deltaSince(item,
            ZonedDateTime.of(1940, 1, 1, 0, 0, 0, 0, ZoneId.systemDefault()), TestPersistenceService.ID);
    assertNull(delta);
    delta = PersistenceExtensions.deltaSince(item, ZonedDateTime.of(2005, 1, 1, 0, 0, 0, 0, ZoneId.systemDefault()),
            TestPersistenceService.ID);
    assertNotNull(delta);
    assertEquals(7, delta.doubleValue(), 0.001);
    item.setState(new QuantityType<>(2012, SIUnits.CELSIUS));
    delta = PersistenceExtensions.deltaSince(item, ZonedDateTime.of(2005, 1, 1, 0, 0, 0, 0, ZoneId.systemDefault()),
            TestPersistenceService.ID);
    assertNotNull(delta);
    assertEquals(7, delta.doubleValue(), 0.001);
    // default persistence service
    delta = PersistenceExtensions.deltaSince(item,
            ZonedDateTime.of(2005, 1, 1, 0, 0, 0, 0, ZoneId.systemDefault()));
    assertNull(delta);
}