@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);
    }
@SuppressWarnings("deprecation")
    @Test
    public void removeActions() {
        CauseAction a1 = new CauseAction();
        ParametersAction a2 = new ParametersAction();
        thing.addAction(a1);
        thing.addAction(a2);
        assertEquals(Arrays.asList(a1, a2), thing.getActions());
        assertThat(thing.removeActions(CauseAction.class), is(true));
        assertEquals(List.of(a2), thing.getActions());
        assertThat(thing.removeActions(CauseAction.class), is(false));
        assertEquals(List.of(a2), thing.getActions());
    }