### Question:
CollisionFunctionConfig { public static CollisionFunction imports(Xml parent) { Check.notNull(parent); final Xml node = parent.getChild(FUNCTION); final String name = node.readString(TYPE); try { final CollisionFunctionType type = CollisionFunctionType.valueOf(name); switch (type) { case LINEAR: return new CollisionFunctionLinear(node.readDouble(A), node.readDouble(B)); default: throw new LionEngineException(ERROR_TYPE + name); } } catch (final IllegalArgumentException | NullPointerException exception) { throw new LionEngineException(exception, ERROR_TYPE + name); } } private  CollisionFunctionConfig(); static CollisionFunction imports(Xml parent); static void exports(Xml root, CollisionFunction function); static final String FUNCTION; static final String TYPE; static final String A; static final String B; }### Answer:
@Test void testFunctionUnknown() { final Xml root = new Xml("function"); root.createChild(CollisionFunctionConfig.FUNCTION) .writeString(CollisionFunctionConfig.TYPE, CollisionFunctionType.values()[1].name()); assertThrows(() -> CollisionFunctionConfig.imports(root), "Unknown type: FAIL"); }