def METHOD_NAME(create_files_in_directory):
    filelist, outdir = create_files_in_directory
    bbr = freesurfer.BBRegister()
    # make sure command gets called
    assert bbr.cmd == "bbregister"
    # test raising error with mandatory args absent
    with pytest.raises(ValueError):
        bbr.cmdline
    bbr.inputs.subject_id = "fsaverage"
    bbr.inputs.source_file = filelist[0]
    bbr.inputs.contrast_type = "t2"
    # Check that 'init' is mandatory in FS < 6, but not in 6+
    if Info.looseversion() < LooseVersion("6.0.0"):
        with pytest.raises(ValueError):
            bbr.cmdline
    else:
        bbr.cmdline
    bbr.inputs.init = "fsl"
    base, ext = os.path.splitext(os.path.basename(filelist[0]))
    if ext == ".gz":
        base, _ = os.path.splitext(base)
    assert bbr.cmdline == (
        "bbregister --t2 --init-fsl "
        "--reg {base}_bbreg_fsaverage.dat "
        "--mov {full} --s fsaverage".format(full=filelist[0], base=base)
    )