@Test
public void testCreateEventItemStatePredictedEventOnOffType() throws Exception {

    Event event = factory.createEvent(ITEM_STATE_PREDICTED_EVENT_TYPE, ITEM_STATE_PREDICTED_EVENT_TOPIC,
            ITEM_STATE_PREDICTED_EVENT_PAYLOAD, SOURCE);
    assertEquals(ItemStatePredictedEvent.class, event.getClass());
    ItemStatePredictedEvent itemStatePredictedEvent = (ItemStatePredictedEvent) event;
    assertEquals(ITEM_STATE_PREDICTED_EVENT_TYPE, itemStatePredictedEvent.getType());
    assertEquals(ITEM_STATE_PREDICTED_EVENT_TOPIC, itemStatePredictedEvent.getTopic());
    assertEquals(ITEM_STATE_PREDICTED_EVENT_PAYLOAD, itemStatePredictedEvent.getPayload());
    assertEquals(ITEM_NAME, itemStatePredictedEvent.getItemName());
    assertEquals(OnOffType.class, itemStatePredictedEvent.getPredictedState().getClass());
    assertEquals(ITEM_STATE, itemStatePredictedEvent.getPredictedState());
}