fun <T> beIn(collection: Collection<T>): Matcher<T>
Matcher that verifies that this element is in collection by comparing value
Assertion to check that this element is in collection. This assertion checks by value, and not by reference, therefore even if the exact instance is not in collection but another instance with same value is present, the test will pass.
An empty collection will always fail. If you need to check for empty collection, use Collection.shouldBeEmpty
See Also