@Override
    public void check(Collection<? extends T> collection, ConditionEvents events) {
        ViolatedAndSatisfiedConditionEvents subEvents = new ViolatedAndSatisfiedConditionEvents();
        for (T item : collection) {
            condition.check(item, subEvents);
        }
        if (!subEvents.getAllowed().isEmpty() || !subEvents.getViolating().isEmpty()) {
            events.add(new OnlyConditionEvent(collection, subEvents));
        }
    }
@Test
    public void inverting_works() {
        ConditionEvents events = ConditionEvents.Factory.create();
        ArchCondition<Collection<?>> condition = containOnlyElementsThat(IS_SERIALIZABLE);

        condition.check(TWO_SERIALIZABLE_OBJECTS, events);
        assertThat(events).containNoViolation();

        events = ConditionEvents.Factory.create();
        never(condition).check(TWO_SERIALIZABLE_OBJECTS, events);
        assertThat(events).containViolations(messageForTwoTimes(isSerializableMessageFor(SerializableObject.class)));
    }