@Test
public void testCreateEventItemCommandEventRefreshType() throws Exception {

    Event event = factory.createEvent(ITEM_COMMAND_EVENT_TYPE, ITEM_COMMAND_EVENT_TOPIC,
            ITEM_REFRESH_COMMAND_EVENT_PAYLOAD, SOURCE);
    assertEquals(ItemCommandEvent.class, event.getClass());
    ItemCommandEvent itemCommandEvent = (ItemCommandEvent) event;
    assertEquals(ITEM_COMMAND_EVENT_TYPE, itemCommandEvent.getType());
    assertEquals(ITEM_COMMAND_EVENT_TOPIC, itemCommandEvent.getTopic());
    assertEquals(ITEM_REFRESH_COMMAND_EVENT_PAYLOAD, itemCommandEvent.getPayload());
    assertEquals(ITEM_NAME, itemCommandEvent.getItemName());
    assertEquals(SOURCE, itemCommandEvent.getSource());
    assertEquals(RefreshType.REFRESH, itemCommandEvent.getItemCommand());
}