### Question:
JcrCategoryAllowedActions extends JcrAllowedActions { @Override public boolean enable(Principal principal, Set<Action> actions) { boolean changed = super.enable(principal, actions); updateEntityAccess(principal, getEnabledActions(principal)); return changed; } JcrCategoryAllowedActions(Node allowedActionsNode); @Override boolean enable(Principal principal, Set<Action> actions); @Override boolean enableOnly(Principal principal, Set<Action> actions); @Override boolean enableOnly(Principal principal, AllowedActions actions); @Override boolean disable(Principal principal, Set<Action> actions); @Override void setupAccessControl(Principal owner); @Override void removeAccessControl(Principal owner);  }### Answer:
@Test public void testSummaryOnlyRead() { Object[] nameDescr = metadata.commit(() -> { Category cat = this.categoryProvider.findById(idB); cat.getAllowedActions().enable(TEST_USER1, CategoryAccessControl.ACCESS_CATEGORY); return new String[]{cat.getSystemName(), cat.getDescription()}; }, TEST_USER2); metadata.read(() -> { Category cat = this.categoryProvider.findById(idB); assertThat(cat).extracting("systemName", "description").contains(nameDescr); assertThat(cat.getUserProperties()).isEmpty(); }, TEST_USER1); }