@Test void testPayloadType() { assertTrue(Conflicts.payloadTypeOf(String.class).test(events)); assertTrue(Conflicts.payloadTypeOf(Object.class).test(events)); assertFalse(Conflicts.payloadTypeOf(Long.class).test(events)); }
public static <T> Predicate<List<DomainEventMessage<?>>> payloadTypeOf(Class<T> payloadType) { return eventMatching(event -> payloadType.isAssignableFrom(event.getPayloadType())); }
Conflicts { public static <T> Predicate<List<DomainEventMessage<?>>> payloadTypeOf(Class<T> payloadType) { return eventMatching(event -> payloadType.isAssignableFrom(event.getPayloadType())); } }
Conflicts { public static <T> Predicate<List<DomainEventMessage<?>>> payloadTypeOf(Class<T> payloadType) { return eventMatching(event -> payloadType.isAssignableFrom(event.getPayloadType())); } private  Conflicts(); }
Conflicts { public static <T> Predicate<List<DomainEventMessage<?>>> payloadTypeOf(Class<T> payloadType) { return eventMatching(event -> payloadType.isAssignableFrom(event.getPayloadType())); } private  Conflicts(); static Predicate<List<T>> eventMatching(
            Predicate<? super T> messageFilter); static Predicate<List<DomainEventMessage<?>>> payloadMatching(Predicate<Object> payloadFilter); @SuppressWarnings("unchecked") static Predicate<List<DomainEventMessage<?>>> payloadMatching(Class<T> payloadType,
                                                                       Predicate<? super T>
                                                                                               payloadFilter); static Predicate<List<DomainEventMessage<?>>> payloadTypeOf(Class<T> payloadType); }
Conflicts { public static <T> Predicate<List<DomainEventMessage<?>>> payloadTypeOf(Class<T> payloadType) { return eventMatching(event -> payloadType.isAssignableFrom(event.getPayloadType())); } private  Conflicts(); static Predicate<List<T>> eventMatching(
            Predicate<? super T> messageFilter); static Predicate<List<DomainEventMessage<?>>> payloadMatching(Predicate<Object> payloadFilter); @SuppressWarnings("unchecked") static Predicate<List<DomainEventMessage<?>>> payloadMatching(Class<T> payloadType,
                                                                       Predicate<? super T>
                                                                                               payloadFilter); static Predicate<List<DomainEventMessage<?>>> payloadTypeOf(Class<T> payloadType);  }