@SuppressWarnings("ConstantConditions")
    public boolean removeActions(@NonNull Class<? extends Action> clazz) {
        if (clazz == null) {
            throw new IllegalArgumentException("Action type must be non-null");
        }
        // CopyOnWriteArrayList does not support Iterator.remove, so need to do it this way:
        List<Action> old = new ArrayList<>();
        List<Action> current = getActions();
        for (Action a : current) {
            if (clazz.isInstance(a)) {
                old.add(a);
            }
        }
        return current.removeAll(old);
    }
@Test
    public void removeActions_null() {
        assertThrows(IllegalArgumentException.class, () -> thing.removeActions(null));
    }