Extract MockMethod.install()
Convert class MockFunction to a closure.