Wrapping predicates

In JUnit 5 which is one of the standard Unit Test platforms for Java there is a resource allocation example that uses @Before on line 23 to create a collection and then uses @After on line 28 to clear the collection. Because all of the wrapper methods are implemented in one class the methods can pass state via an instance value without passing via the wrapped method arguments.