Added roles and tests to gen-dispatch.