Fix: Optional method should be called inside closure so that each generated value is optional
Make compatible with phpunit  3.7.x