Decline a merge with merge hook

Hi,
I’m trying to implement a merge hook that once a user tries to merge a pull request from the bit bucket dashboard I will do some functionality I will decide either to allow or decline the merge.

I created a merge plugin using atlas-create-bitbucket-plugin-module.

this created the following template :

package bitbcuketplugincpp.hook;

import com.atlassian.bitbucket.pull.PullRequestParticipant;
import com.atlassian.bitbucket.repository.hook.*;
import com.atlassian.bitbucket.repository.Repository;
import com.atlassian.bitbucket.setting.*;

import java.util.regex.Pattern;

public class MyMergeHook implements RepositoryMergeRequestCheck, RepositorySettingsValidator
{
    private static final Pattern NUMBER_PATTERN = Pattern.compile("[0-9]+");

    /**
     * Vetos a pull-request if there aren't enough reviewers.
     */
    @Override
    public void check(RepositoryMergeRequestCheckContext context)
    {
        int requiredReviewers = Integer.parseInt(context.getSettings().getString("reviewers"));
        int acceptedCount = 0;
        for (PullRequestParticipant reviewer : context.getMergeRequest().getPullRequest().getReviewers())
        {
            acceptedCount = acceptedCount + (reviewer.isApproved() ? 1 : 0);
        }
        if (acceptedCount < requiredReviewers)
        {
            context.getMergeRequest().veto("Not enough approved reviewers", acceptedCount + " reviewers have approved your pull request. You need " + requiredReviewers + " (total) before you may merge.");
        }
    }

    @Override
    public void validate(Settings settings, SettingsValidationErrors errors, Repository repository)
    {
        String numReviewersString = settings.getString("reviewers", "0").trim();
        if (!NUMBER_PATTERN.matcher(numReviewersString).matches())
        {
            errors.addFieldError("reviewers", "Enter a number");
        }
        else if (Integer.parseInt(numReviewersString) <= 0)
        {
            errors.addFieldError("reviewers", "Number of reviewers must be greater than zero");
        }
    }
}

now a Is understand the validate() function just makes sure when the user enables the hook he will follow certain rules
and the check() function will be called when the pull request is created and then decide either or not to allow the user to press the merge button.

is there a hook to run functionality after the merge button is pressed and then decide if to accept or decline it or is that only up to the reviewer?
I want to run an automated test at this stage?

Thanks!