def METHOD_NAME(data_fixture):
    session_id = "session-id"
    user = data_fixture.create_user(session_id=session_id)
    workspace = data_fixture.create_workspace(user=user)
    application_type = "database"
    application_name = "My Application"
    application = CoreHandler().create_application(
        user, workspace, application_type, application_name
    )
    assert Application.objects.count() == 1
    duplicate_application_job = JobHandler().create_and_start_job(
        user,
        DuplicateApplicationJobType.type,
        application_id=application.id,
    )
    assert Application.objects.count() == 2
    duplicate_application_job.refresh_from_db()
    assert duplicate_application_job.state == JOB_FINISHED
    assert duplicate_application_job.original_application_id == application.id
    assert duplicate_application_job.duplicated_application_id is not None
    duplicated_application = CoreHandler().get_application(
        duplicate_application_job.duplicated_application_id
    )
    assert duplicated_application.name == f"{application_name} 2"
    # assert that user_session_id and user_websocket_id are not mandatory
    # and the job can be called synchronously
    duplicate_application_job_2 = JobHandler().create_and_start_job(
        user, DuplicateApplicationJobType.type, application_id=application.id, sync=True
    )
    assert Application.objects.count() == 3
    assert duplicate_application_job_2.state == JOB_FINISHED
    assert duplicate_application_job_2.original_application_id == application.id
    assert duplicate_application_job_2.duplicated_application_id is not None
    duplicated_application_2 = CoreHandler().get_application(
        duplicate_application_job_2.duplicated_application_id
    )
    assert duplicated_application_2.name == f"{application_name} 3"
    # assert application_id is mandatory
    with pytest.raises(KeyError):
        duplicate_application_job_2 = JobHandler().create_and_start_job(
            user, DuplicateApplicationJobType.type, sync=True
        )
    assert Application.objects.count() == 3