I have some nested lists I would like to assert using hamcrest. Basically they are lists of items contained in a list.
e.g.
List<List<String>> [[bed, bench, bookshelf], [book, bowl, basket], [bar, biscuit, smoked beef]]
I would like to assert that every item starts with "b"
hasItem seems to stop matching after the first list.
assertThat(list, hasItem(everyItem(startsWith("b"))));
How can I do this in hamcrest?
I have tried contains as well.
Thanks...