### Question:
CollidableConfig { public static CollidableConfig imports(Configurer configurer) { Check.notNull(configurer); if (configurer.hasNode(NODE_COLLIDABLE)) { final Integer group = Integer.valueOf(configurer.getIntegerDefault(DEFAULT_GROUP.intValue(), ATT_GROUP, NODE_COLLIDABLE)); final String accepted = configurer.getStringDefault(Constant.EMPTY_STRING, ATT_ACCEPTED, NODE_COLLIDABLE); final Collection<Integer> acceptedGroups; if (accepted.isEmpty()) { acceptedGroups = new ArrayList<>(); } else { acceptedGroups = Arrays.asList(ACCEPTED_SEPARATOR_PATTERN.split(accepted)) .stream() .map(Integer::valueOf) .collect(Collectors.toSet()); } return new CollidableConfig(group, acceptedGroups); } return new CollidableConfig(DEFAULT_GROUP, Collections.emptySet()); } CollidableConfig(Integer group, Collection<Integer> accepted); static CollidableConfig imports(Configurer configurer); static void exports(Xml root, Collidable collidable); Integer getGroup(); Collection<Integer> getAccepted(); @Override int hashCode(); @Override boolean equals(Object object); @Override String toString(); static final String NODE_COLLIDABLE; static final String ATT_GROUP; static final String ATT_ACCEPTED; static final Integer DEFAULT_GROUP; }### Answer:
@Test void testInvalidGroup() { final Media media = Medias.create("Object.xml"); final Xml root = new Xml("test"); final Xml node = root.createChild(CollidableConfig.NODE_COLLIDABLE); node.writeString(CollidableConfig.ATT_GROUP, "a"); root.save(media); assertCause(() -> CollidableConfig.imports(new Configurer(media)), NumberFormatException.class); assertTrue(media.getFile().delete()); }