def METHOD_NAME(self, m_run_command, m_exit_json):
    ca_test_common.set_module_args({
        'name': fake_name
    })
    m_exit_json.side_effect = ca_test_common.exit_json
    stdout = 'Stopping old systemd unit ceph-mon@{}...\n' \
             'Disabling old systemd unit ceph-mon@{}...\n' \
             'Moving data...\n' \
             'Chowning content...\n' \
             'Moving logs...\n' \
             'Creating new units...\n' \
             'firewalld ready'.format(fake_name, fake_name)
    stderr = ''
    rc = 0
    m_run_command.side_effect = [
        (0, '[{{"style":"legacy","name":"{}"}}]'.format(fake_name), ''),
        (rc, stdout, stderr)
    ]
    with pytest.raises(ca_test_common.AnsibleExitJson) as result:
        cephadm_adopt.main()
    result = result.value.args[0]
    assert result['changed']
    assert result['cmd'] == ['cephadm', 'adopt', '--cluster', fake_cluster, '--name', fake_name, '--style', 'legacy']
    assert result['rc'] == 0
    assert result['stderr'] == stderr
    assert result['stdout'] == stdout