### Question:
EnforcerConfig { public boolean hasEntriesFor(String identifier) { if (Stream.of(readExceptions, readAndTrackExceptions, writeExceptions, execExceptions) .anyMatch(m -> m.containsKey(identifier))) { return true; } if (Stream.of(exclusions, networkExceptions).anyMatch(l -> l.contains(identifier))) { return true; } return false; } private  EnforcerConfig(boolean enforce, Map<String, Collection<String>> readExceptions,
      Map<String, Collection<String>> readAndTrackExceptions,
      Map<String, Collection<String>> writeExceptions,
      Map<String, Collection<String>> execExceptions, List<String> exclusions,
      List<String> networkExceptions); static EnforcerConfig fromFile(Path config); static Builder builder(); static EnforcerConfig empty(); Collection<String> getReadExceptions(String identifier); Collection<String> getReadAndTrackExceptions(String identifier); Collection<String> getWriteExceptions(String identifier); Collection<String> getExecExceptions(String identifier); boolean enforce(); boolean exclude(String identifier); boolean allowNetworkAccess(String identifier); boolean hasEntriesFor(String identifier); boolean hasWildcardEntries(); static final String ALL_BUILDERS; }### Answer:
@Test public void testHasEntriesFor() throws Exception { config = EnforcerConfig.builder().enforce(true).withReadException("1", "/some/file") .withWriteException("2", "/not/checking").withExecException("3", "/some/other") .withNetworkException("4").withExclusion("5").withExecException("*", "git").build(); assertThat(config.hasEntriesFor("1")).isTrue(); assertThat(config.hasEntriesFor("2")).isTrue(); assertThat(config.hasEntriesFor("3")).isTrue(); assertThat(config.hasEntriesFor("4")).isTrue(); assertThat(config.hasEntriesFor("5")).isTrue(); assertThat(config.hasEntriesFor("6")).isFalse(); }