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