Added tests for prevent invitation and whitelist