@Test
public void testMinimumSince() {

    item.setState(new QuantityType<>(5000, SIUnits.CELSIUS));
    HistoricItem historicItem = PersistenceExtensions.minimumSince(item,
            ZonedDateTime.of(1940, 1, 1, 0, 0, 0, 0, ZoneId.systemDefault()), TestPersistenceService.ID);
    assertNotNull(historicItem);
    assertEquals("5000", historicItem.getState().toString());
    item.setState(new DecimalType(5000));
    historicItem = PersistenceExtensions.minimumSince(item,
            ZonedDateTime.of(1940, 1, 1, 0, 0, 0, 0, ZoneId.systemDefault()), TestPersistenceService.ID);
    assertNotNull(historicItem);
    assertEquals("5000", historicItem.getState().toString());
    historicItem = PersistenceExtensions.minimumSince(item,
            ZonedDateTime.of(2005, 1, 1, 0, 0, 0, 0, ZoneId.systemDefault()), TestPersistenceService.ID);
    assertNotNull(historicItem);
    assertEquals("2005", historicItem.getState().toString());
    assertEquals(ZonedDateTime.of(2005, 1, 1, 0, 0, 0, 0, ZoneId.systemDefault()), historicItem.getTimestamp());
    // default persistence service
    historicItem = PersistenceExtensions.minimumSince(item,
            ZonedDateTime.of(2005, 1, 1, 0, 0, 0, 0, ZoneId.systemDefault()));
    assertNotNull(historicItem);
    assertEquals("5000", historicItem.getState().toString());
}