def METHOD_NAME(self):
    bootstrap = Bootstrap(ztps_default_config=True)
    version = random_string()
    image = random_string()
    url = "http://{}/{}".format(bootstrap.server, image)
    bootstrap.ztps.set_definition_response(
        actions=[
            {"action": "test_action", "attributes": {"url": url, "version": version}},
            {"action": "startup_config_action"},
        ]
    )
    action = get_action("install_image")
    bootstrap.ztps.set_action_response("test_action", action)
    bootstrap.ztps.set_action_response("startup_config_action", startup_config_action())
    bootstrap.ztps.set_file_response(image, print_action())
    bootstrap.start_test()
    image_file = "{}/EOS-{}.swi".format(bootstrap.flash, version)
    try:
        self.assertTrue(os.path.isfile(image_file))
        self.assertTrue(bootstrap.success())
        self.assertTrue(eapi_log()[-1] == "install source flash:EOS-{}.swi".format(version))
    except AssertionError as assertion:
        print("Output: {}".format(bootstrap.output))
        print("Error: {}".format(bootstrap.error))
        raise_exception(assertion)
    finally:
        remove_file(image_file)
        bootstrap.end_test()