@Test
public void testEvolutionRate() {

    item.setState(new DecimalType(2012));
    DecimalType rate = PersistenceExtensions.evolutionRate(item,
            ZonedDateTime.of(1940, 1, 1, 0, 0, 0, 0, ZoneId.systemDefault()), TestPersistenceService.ID);
    assertNull(rate);
    rate = PersistenceExtensions.evolutionRate(item,
            ZonedDateTime.of(2005, 1, 1, 0, 0, 0, 0, ZoneId.systemDefault()), TestPersistenceService.ID);
    assertNotNull(rate);
    // ((now - then) / then) * 100
    assertEquals(0.349127182, rate.doubleValue(), 0.001);
    item.setState(new QuantityType<>(2012, SIUnits.CELSIUS));
    rate = PersistenceExtensions.evolutionRate(item,
            ZonedDateTime.of(2005, 1, 1, 0, 0, 0, 0, ZoneId.systemDefault()), TestPersistenceService.ID);
    assertNotNull(rate);
    // ((now - then) / then) * 100
    assertEquals(0.349127182, rate.doubleValue(), 0.001);
    // default persistence service
    rate = PersistenceExtensions.evolutionRate(item,
            ZonedDateTime.of(2005, 1, 1, 0, 0, 0, 0, ZoneId.systemDefault()));
    assertNull(rate);
}