Updated to allow predicates in collection assertions.