### Question:
RecommendEnsureAuthorizable implements ProgressCheckFactory { @Override public ProgressCheck newInstance(final JsonObject config) { final Severity severity = Severity.valueOf(config.getString(CONFIG_SEVERITY, Severity.MINOR.name()).toUpperCase()); final String recommendation = config.getString(CONFIG_RECOMMENDATION, DEFAULT_RECOMMENDATION); final List<Rule> scopeIds = Rules.fromJsonArray(arrayOrEmpty(config, CONFIG_SCOPE_IDS)); return new Check(severity, recommendation, scopeIds); }  @Override ProgressCheck newInstance(final JsonObject config); static final String NT_REP_AUTHORIZABLE; static final String CONFIG_SEVERITY; static final String CONFIG_RECOMMENDATION; static final String CONFIG_SCOPE_IDS; static final String DEFAULT_RECOMMENDATION; }### Answer:
@Test public void testCheckNone() throws Exception { ProgressCheck check = new RecommendEnsureAuthorizable() .newInstance(key("scopeIds", arr(Rules.DEFAULT_DENY)).get()); CheckReport reportValid = scanWithCheck(check, pack); assertEquals("No violations when deny all authorizable ids.", 0, reportValid.getViolations().size()); }
@Test public void testCheckAll() throws Exception { ProgressCheck check = new RecommendEnsureAuthorizable().newInstance(obj().get()); CheckReport reportValid = scanWithCheck(check, pack); assertEquals("3 violations when allow all authorizable ids.", 3, reportValid.getViolations().size()); }