PermissionsManager { public void checkActionsSupporting(String domainId, List<String> actions) throws NotFoundException, ConflictException { checkActionsSupporting(getDomain(domainId), actions); } @Inject  PermissionsManager(
      EventService eventService, Set<PermissionsDao<? extends AbstractPermissions>> daos); void storePermission(Permissions permissions); AbstractPermissions get(String userId, String domainId, String instanceId); @SuppressWarnings("unchecked") Page<AbstractPermissions> getByInstance(
      String domainId, String instanceId, int maxItems, long skipCount); void remove(String userId, String domainId, String instanceId); boolean exists(String userId, String domainId, String instanceId, String action); void checkActionsSupporting(String domainId, List<String> actions); List<AbstractPermissionsDomain> getDomains(); AbstractPermissionsDomain<? extends AbstractPermissions> getDomain(String domain);  }
@Test public void shouldDoNothingOnActionSupportingCheckingWhenListDoesNotContainUnsupportedAction() throws Exception { permissionsManager.checkActionsSupporting("test", Arrays.asList("write", "use")); }
@Test( expectedExceptions = ConflictException.class, expectedExceptionsMessageRegExp = "Domain with id 'test' doesn't support following action\\(s\\): unsupported") public void shouldThrowConflictExceptionOnActionSupportingCheckingWhenListContainsUnsupportedAction() throws Exception { permissionsManager.checkActionsSupporting("test", Arrays.asList("write", "use", "unsupported")); }