class Configuration { String name, String type }
Configuration[] configurations = ..
I want to put a assert check to see if the array contains a certain value in the name field (say name="Any"). We are currently looping the array to check this, what would be an elegant way
Using the Streams API:
assertTrue(Arrays.stream(configurations).anyMatch(c -> "Any".equals(c.name));