strikt-core / strikt.assertions / containsExactly

containsExactly

fun <T : Iterable<E>, E> Builder<T>.containsExactly(vararg elements: E): Builder<T>
infix fun <T : Iterable<E>, E> Builder<T>.containsExactly(elements: Collection<E>): Builder<T>

Asserts that all elements and no others are present in the subject in the specified order.

If the subject has no guaranteed iteration order (for example a Set) this assertion is probably not appropriate and you should use containsExactlyInAnyOrder instead.