@Test
public void testConversionToOnOffType() {

    assertEquals(OnOffType.ON, new QuantityType<>("1").as(OnOffType.class));
    assertEquals(OnOffType.OFF, new QuantityType<>("0").as(OnOffType.class));
    assertEquals(OnOffType.ON, new QuantityType<>("1 %").as(OnOffType.class));
    assertEquals(OnOffType.ON, new QuantityType<>("100 %").as(OnOffType.class));
    assertEquals(OnOffType.OFF, new QuantityType<>("0 %").as(OnOffType.class));
}