def METHOD_NAME(
    subject: usb_config.SerialGadget, os_driver: mock.Mock, tmpdir: Path
) -> None:
    # Use the real `os.makedirs` method
    os_driver.makedirs = usb_config.OSDriver.makedirs
    # Not ideal to modify the subject, but we want to write the filetree
    # in the temp directory
    subject._basename = str(tmpdir)
    subject.configure_and_activate()
    # Check that all files are written
    for f in config_files:
        fullpath = os.path.join(tmpdir, f[0])
        with open(fullpath, mode="r") as written:
            assert written.read() == f[1]
    # Check that appropriate directories were built
    for folder in config_dirs:
        assert os.path.exists(os.path.join(tmpdir, folder))
    # Check that a symlink was set up
    os_driver.symlink.assert_called_with(
        source=os.path.join(tmpdir, "functions/acm.usb0"),
        dest=os.path.join(tmpdir, "configs/c.1/acm.usb0"),
    )