I have a List of Optionals, like List<Optional<String>> optionals
and I like to use assertj
on it to assert several things.
But I fail to do this properly - I only find examples on a single Optional.
Of course I can do all checks by myself like
Assertions.assertThat(s).allMatch(s1 -> s1.isPresent() && s1.get().equals("foo"));
and chain those, but I still have the feeling, that there is a more smart way via the api.
Do I miss something here or is there no support for List<Optional<T>>
in assertj ?