@Test
public void testUpdateStateWithPercentType() {

    ColorItem item = new ColorItem("test");
    item.setState(new HSBType(new DecimalType(75), new PercentType(75), new PercentType(75)));
    item.setState(new PercentType(50));
    assertEquals(new HSBType(new DecimalType(75), new PercentType(75), new PercentType(50)), item.getState());
}