@@ -0,0 +1,1380 @@
+/**%0A * Copyright (c) Microsoft Corporation. All rights reserved.%0A * Licensed under the MIT License. See License.txt in the project root for%0A * license information.%0A */%0A%0Apackage com.microsoft.azure.management.resources.core;%0A%0Aimport org.junit.Assert;%0Aimport org.junit.Test;%0A%0Aimport java.util.regex.Matcher;%0Aimport java.util.regex.Pattern;%0A%0Apublic class TestResourceProviderRegistration %7B%0A    @Test%0A    public void testManuallyUnregisteredRp() %7B%0A        String error = %22%7B%5C%22error%5C%22:%7B%5C%22code%5C%22:%5C%22MissingSubscriptionRegistration%5C%22,%5C%22message%5C%22:%5C%22The subscription is not registered to use namespace 'Microsoft.Devices'. See https://aka.ms/rps-not-found for how to register subscriptions.%5C%22%7D%7D%22;%0A        Matcher matcher = Pattern.compile(%22.*'(.*)'%22).matcher(error);%0A        matcher.find();%0A        Assert.assertEquals(%22Microsoft.Devices%22, matcher.group(1));%0A    %7D%0A%0A    @Test%0A    public void testRpInNewSubscription() %7B%0A        String error = %22%7B%5C%22error%5C%22:%7B%5C%22code%5C%22:%5C%22MissingSubscriptionRegistration%5C%22,%5C%22message%5C%22:%5C%22The subscription registration is in 'Unregistered' state. The subscription must be registered to use namespace 'Microsoft.Devices'. See https://aka.ms/rps-not-found for how to register subscriptions.%5C%22%7D%7D%22;%0A        Matcher matcher = Pattern.compile(%22.*'(.*)'%22).matcher(error);%0A        matcher.find();%0A        Assert.assertEquals(%22Microsoft.Devices%22, matcher.group(1));%0A    %7D%0A%7D%0A

Add rp auto registration unit test