Having a whole randomSeedGenerator is overkill; it made us wonder "is this an interface that stubs get to use? is the whole object passed somewhere?". Just have a single generateRandomSeed function that accesses a var randomSeed at this scope. That function could just literally be written inside the new MethodInvocation, or could be written here.