test_class.file: core/src/test/java/net/adamcin/oakpal/core/checks/AcHandlingTest.java
test_class.identifier: AcHandlingTest
test_class.superclass: extends ProgressCheckTestBase
test_case.body: @Test
      public void testLevelSet() throws Exception {
          TestUtil.testBlock(() -> {
              ProgressCheck check = new AcHandling().newInstance(obj().key("levelSet", "no_unsafe").get());
              CheckReport report = scanWithCheck(check, "test_childnodeorder.zip");
              logViolations("level_set:no_unsafe", report);
              Assert.assertEquals("no violations", 0, report.getViolations().size());
              assertTrue("all violations have packageIds", report.getViolations().stream()
                      .allMatch(viol -> !viol.getPackages().isEmpty()));
          });
          TestUtil.testBlock(() -> {
              ProgressCheck check = new AcHandling().newInstance(obj().key("levelSet", "only_ignore").get());
              CheckReport report = scanWithCheck(check, "test_childnodeorder.zip");
              logViolations("level_set:only_ignore", report);
              Assert.assertEquals("one violation", 1, report.getViolations().size());
              assertTrue("all violations have packageIds", report.getViolations().stream()
                      .allMatch(viol -> !viol.getPackages().isEmpty()));
          });
      }
test_case.class_method_signature: AcHandlingTest.testLevelSet()
test_case.full_signature: @Test public void testLevelSet()
test_case.identifier: testLevelSet
test_case.invocations: testBlock newInstance get key obj scanWithCheck logViolations assertEquals size getViolations assertTrue allMatch stream getViolations isEmpty getPackages testBlock newInstance get key obj scanWithCheck logViolations assertEquals size getViolations assertTrue allMatch stream getViolations isEmpty getPackages
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testLevelSet()
focal_class.declarator: KEYS = new JsonKeys() {
          @Override
          public String allowedModes() {
              return "allowedModes";
          }
  
          @Override
          public String levelSet() {
              return "levelSet";
          }
      }
focal_class.modifier: private static final
focal_class.original_string: private static final JsonKeys KEYS = new JsonKeys() {
          @Override
          public String allowedModes() {
              return "allowedModes";
          }
  
          @Override
          public String levelSet() {
              return "levelSet";
          }
      };
focal_class.type: JsonKeys
focal_class.var_name: KEYS
focal_class.declarator: CONFIG_ALLOWED_MODES = keys().allowedModes()
focal_class.modifier: @Deprecated
      public static final
focal_class.original_string: @Deprecated
      public static final String CONFIG_ALLOWED_MODES = keys().allowedModes();
focal_class.type: String
focal_class.var_name: CONFIG_ALLOWED_MODES
focal_class.declarator: CONFIG_LEVEL_SET = keys().levelSet()
focal_class.modifier: @Deprecated
      public static final
focal_class.original_string: @Deprecated
      public static final String CONFIG_LEVEL_SET = keys().levelSet();
focal_class.type: String
focal_class.var_name: CONFIG_LEVEL_SET
focal_class.declarator: DEFAULT_LEVEL_SET = ACHandlingLevelSet.NO_UNSAFE
focal_class.modifier: static final
focal_class.original_string: static final ACHandlingLevelSet DEFAULT_LEVEL_SET = ACHandlingLevelSet.NO_UNSAFE;
focal_class.type: ACHandlingLevelSet
focal_class.var_name: DEFAULT_LEVEL_SET
focal_class.file: core/src/main/java/net/adamcin/oakpal/core/checks/AcHandling.java
focal_class.identifier: AcHandling
focal_class.interfaces: implements ProgressCheckFactory
focal_class.class_method_signature: AcHandling.keys()
focal_class.full_signature: public static JsonKeys keys()
focal_class.identifier: keys
focal_class.modifiers: public static
focal_class.parameters: ()
focal_class.return: JsonKeys
focal_class.signature: JsonKeys keys()
focal_class.class_method_signature: AcHandling.newInstance(final JsonObject config)
focal_class.full_signature: @Override public ProgressCheck newInstance(final JsonObject config)
focal_class.identifier: newInstance
focal_class.modifiers: @Override public
focal_class.parameters: (final JsonObject config)
focal_class.return: ProgressCheck
focal_class.signature: ProgressCheck newInstance(final JsonObject config)
focal_method.body: @Override
      public ProgressCheck newInstance(final JsonObject config) {
          if (hasNonNull(config, keys().allowedModes())) {
              List<AccessControlHandling> allowedModes = mapArrayOfStrings(arrayOrEmpty(config, keys().allowedModes()),
                      compose1(String::toUpperCase, AccessControlHandling::valueOf), true);
              return new Check(ACHandlingLevelSet.EXPLICIT, allowedModes);
          } else if (hasNonNull(config, keys().levelSet())) {
              ACHandlingLevelSet levelSet = ACHandlingLevelSet.valueOf(config.getString(keys().levelSet()).toUpperCase());
              return new Check(levelSet, Collections.emptyList());
          } else {
              return new Check(DEFAULT_LEVEL_SET, Collections.emptyList());
          }
      }
focal_method.class_method_signature: AcHandling.newInstance(final JsonObject config)
focal_method.full_signature: @Override public ProgressCheck newInstance(final JsonObject config)
focal_method.identifier: newInstance
focal_method.invocations: hasNonNull allowedModes keys mapArrayOfStrings arrayOrEmpty allowedModes keys compose1 hasNonNull levelSet keys valueOf toUpperCase getString levelSet keys emptyList emptyList
focal_method.modifiers: @Override public
focal_method.parameters: (final JsonObject config)
focal_method.return: ProgressCheck
focal_method.signature: ProgressCheck newInstance(final JsonObject config)