DependencyRules { public static DependencyRules allowAll() { return new DependencyRules(new ArrayList<>(), true, true, true); } private  DependencyRules(List<DependencyRule> rules, boolean allowAll,
                            boolean allowIntraPackageCycles, boolean allowIntraPackageDeps); static DependencyRules allowAll(); static DependencyRules denyAll(); DependencyRules allowIntraPackageCycles(boolean allowIntraPackageCycles); DependencyRules allowIntraPackageDependencies(boolean allowIntraPackageDeps); DependencyRule addRule(String pack); DependencyRule addRule(DependencyRule pack); DependencyRule addExternal(String pack); DependencyRules withRules(String basePackage, DependencyRuler ruler); DependencyRules withAbsoluteRules(DependencyRuler... rulers); DependencyRules withRelativeRules(DependencyRuler... rulers); DependencyRules withExternals(DependencyRuler... rulers); DependencyRules withExternals(String... externals); DependencyRule rule(String pattern); Dependencies analyzeRules(Scope<T> scope);  }
@Test void wildcardNotAtEnd() { assertThrows(IllegalArgumentException.class, () -> DependencyRule.allowAll("a*b")); }