def METHOD_NAME(self, name, application_type, account_type, current_journal, related_journal, raises):
    ###############################################
    ## set up
    # create the test application (if needed), and the associated current_journal and related_journal in suitable states
    application = None
    cj = None
    rj = None
    if application_type == "found" or application_type == "locked":
        application = Suggestion(**ApplicationFixtureFactory.make_application_source())
        if current_journal == "none":
            application.remove_current_journal()
        elif current_journal == "not_found":
            application.set_current_journal("123456789987654321")
        elif current_journal == "found":
            cj = Journal(**JournalFixtureFactory.make_journal_source())
            cj.set_id(cj.makeid())
            cj.save(blocking=True)
            application.set_current_journal(cj.id)
        elif current_journal == "locked":
            cj = Journal(**JournalFixtureFactory.make_journal_source())
            cj.set_id(cj.makeid())
            cj.save(blocking=True)
            application.set_current_journal(cj.id)
            lock.lock(constants.LOCK_JOURNAL, cj.id, "otheruser")
        if related_journal == "none":
            application.remove_related_journal()
        elif related_journal == "not_found":
            application.set_related_journal("123456789987654321")
        elif related_journal == "found":
            rj = Journal(**JournalFixtureFactory.make_journal_source())
            rj.set_id(rj.makeid())
            rj.save(blocking=True)
            application.set_related_journal(rj.id)
        elif related_journal == "locked":
            rj = Journal(**JournalFixtureFactory.make_journal_source())
            rj.set_id(rj.makeid())
            rj.save(blocking=True)
            application.set_related_journal(rj.id)
            lock.lock(constants.LOCK_JOURNAL, rj.id, "otheruser")
    acc = None
    if account_type != "none":
        acc = Account(**AccountFixtureFactory.make_publisher_source())
        if account_type == "not_permitted":
            acc.remove_role("publisher")
        if application_type == "locked":
            thelock = lock.lock(constants.LOCK_APPLICATION, application.id, "otheruser")
            # we can't explicitly block on the lock, but we can halt until we confirm it is saved
            thelock.blockall([(thelock.id, thelock.last_updated)])
    application_id = None
    if application is not None:
        if acc is not None:
            application.set_owner(acc.id)
        else:
            application.set_owner("randomuser")
        application.save(blocking=True)
        application_id = application.id
    elif application_type == "not_found":
        application_id = "sdjfasofwefkwflkajdfasjd"
    ###########################################################
    # Execution
    svc = DOAJ.applicationService()
    if raises != "":
        with self.assertRaises(EXCEPTIONS[raises]):
            time.sleep(1)
            svc.delete_application(application_id, acc)
        time.sleep(1)
        check_locks(application, cj, rj, acc)
    else:
        svc.delete_application(application_id, acc)
        # we need to sleep, so the index catches up
        time.sleep(1)
        # check that no locks remain set for this user
        check_locks(application, cj, rj, acc)
        # check that the application actually is gone
        if application is not None:
            assert Suggestion.pull(application.id) is None
        # check that the current journal no longer has a reference to the application
        if cj is not None:
            cj = Journal.pull(cj.id)
            assert cj.current_application is None
        # check that the related journal has a record that the application was deleted
        if rj is not None:
            rj = Journal.pull(rj.id)
            record = rj.related_application_record(application.id)
            assert "status" in record
            assert record["status"] == "deleted"