Added a test, changed Generator to a trait, changed protected[this] back to protect on produce