Abstracted mock method generation.