FirmwareEventFactory extends AbstractEventFactory { public static FirmwareUpdateProgressInfoEvent createFirmwareUpdateProgressInfoEvent( FirmwareUpdateProgressInfo progressInfo) { checkNotNull(progressInfo, "progressInfo"); String topic = FIRMWARE_UPDATE_PROGRESS_TOPIC.replace(THING_UID_TOPIC_KEY, progressInfo.getThingUID().getAsString()); String payload = serializePayload(progressInfo); return new FirmwareUpdateProgressInfoEvent(topic, payload, progressInfo); } FirmwareEventFactory(); static FirmwareStatusInfoEvent createFirmwareStatusInfoEvent(FirmwareStatusInfo firmwareStatusInfo); static FirmwareUpdateProgressInfoEvent createFirmwareUpdateProgressInfoEvent(
            FirmwareUpdateProgressInfo progressInfo); static FirmwareUpdateResultInfoEvent createFirmwareUpdateResultInfoEvent(
            FirmwareUpdateResultInfo firmwareUpdateResultInfo);  }
@Test public void testNullUpdateProgressInfo() { assertThrows(IllegalArgumentException.class, () -> FirmwareEventFactory.createFirmwareUpdateProgressInfoEvent(null)); }