@Test
public void testQuantityTypeOnCommandFromItem() {

    ProfileCallback callback = mock(ProfileCallback.class);
    SystemOffsetProfile offsetProfile = createProfile(callback, "3°C");
    Command cmd = new QuantityType<>("23°C");
    offsetProfile.onCommandFromItem(cmd);
    ArgumentCaptor<Command> capture = ArgumentCaptor.forClass(Command.class);
    verify(callback, times(1)).handleCommand(capture.capture());
    Command result = capture.getValue();
    @SuppressWarnings("unchecked")
    QuantityType<Temperature> decResult = (QuantityType<Temperature>) result;
    assertEquals(20, decResult.intValue());
    assertEquals(SIUnits.CELSIUS, decResult.getUnit());
}