### Question:
Include { static Include parse(String component, String defaultEnv) { Matcher componentMatcher = componentPattern.matcher(component); if (!componentMatcher.find()) { throw new IllegalArgumentException("Can't parse include's component: " + component); } String comp = componentMatcher.group("comp"); String env = componentMatcher.group("env"); return new Include(comp, env == null ? defaultEnv : env); }  @Override String toString();  }### Answer:
@Test void testParse() { testInclude("comp", "env", parse("comp[env]", "dev")); testInclude("c.d_-q2", "dev", parse("c.d_-q2", "dev")); assertThrows(IllegalArgumentException.class, () -> parse("*", "e")); }