Hamcrest has random order matchers for collections and arrays (e.g. containsInAnyOrder or containsInRelativeOrder). It would be nice to have similar methods for streams in addition to the existing contains/yields (although probably just use the yields prefix for the new ones).