ChannelGroupTypeBuilder { public static ChannelGroupTypeBuilder instance(ChannelGroupTypeUID channelGroupTypeUID, String label) { if (channelGroupTypeUID == null) { throw new IllegalArgumentException("ChannelGroupTypeUID must be set."); } if (label == null || label.isBlank()) { throw new IllegalArgumentException("Label for a ChannelGroupType must not be empty."); } return new ChannelGroupTypeBuilder(channelGroupTypeUID, label); } private  ChannelGroupTypeBuilder(ChannelGroupTypeUID channelGroupTypeUID, String label); static ChannelGroupTypeBuilder instance(ChannelGroupTypeUID channelGroupTypeUID, String label); ChannelGroupType build(); ChannelGroupTypeBuilder withDescription(String description); ChannelGroupTypeBuilder withCategory(String category); ChannelGroupTypeBuilder withChannelDefinitions(List<ChannelDefinition> channelDefinitions);  }
@Test public void whenLabelIsBlankForStateShouldFail() { assertThrows(IllegalArgumentException.class, () -> ChannelGroupTypeBuilder.instance(CHANNEL_GROUP_TYPE_UID, "")); }