Replaced static mock with JS-generated mock that is ready for dynamic extension.