@Test
public void getAsHSBFromSwitch() {

    SwitchItem item = new SwitchItem("Test");
    item.setState(OnOffType.ON);
    assertEquals(new HSBType("0,0,100"), item.getStateAs(HSBType.class));
    item.setState(OnOffType.OFF);
    assertEquals(new HSBType("0,0,0"), item.getStateAs(HSBType.class));
}