I think you don't need for loop here. Cleaner approach is to use special matcher:
```java
public static <E> Matcher<java.lang.Iterable<? extends E>> contains(E... items);
```
like this
```java
MatcherAssert.assertThat(
   repo.contents().iterate("foo/bar", "ref-1"),
   Matchers.contains(correct)
);
```