> The test suite is quite large.

I couldn't tell from a quick look how large is "large". At my work we have some suites that have several hundred of test classes, some of which have dozens of test methods. We had some suites of JUnit3-style tests run out of memory because they didn't null out references to fields that were initialized in setUp(). So we've seen some issues that other people haven't.

That all being said, it's possible that today, the runners keep a reference to a `TestClass` instance for the life of the run, so the TestClass cache you proposed may not be holding on to references that would otherwise be gc'd

> About the withBefores(): As I mentioned before, IMHO this is a bug,

I think it's an undocumented constraint of the method. The object passed in should be of the same type as the class object passed to the constructor. That seems deeply ingrained in the code. We can try to change those assumptions, but it would be quite easy for us to miss some places where we make this assumption, or add new places that make this assumption.

> Probably, we should extract a component that performs the RunBefores/RunAfters
> nicely on the target and use this method only to delegate to that component.

I agree. And I don't think that would be too complicated to do in this pull. I think you could add `wrapStatement()` methods to both of these, and possible move them out of `internal`