@@ -0,0 +1,2629 @@
+/**%0A * Copyright Microsoft Corporation%0A * %0A * Licensed under the Apache License, Version 2.0 (the %22License%22);%0A * you may not use this file except in compliance with the License.%0A * You may obtain a copy of the License at%0A * http://www.apache.org/licenses/LICENSE-2.0%0A * %0A * Unless required by applicable law or agreed to in writing, software%0A * distributed under the License is distributed on an %22AS IS%22 BASIS,%0A * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.%0A * See the License for the specific language governing permissions and%0A * limitations under the License.%0A */%0Apackage com.microsoft.windowsazure.services.management;%0A%0Aimport static org.junit.Assert.*;%0A%0Aimport java.util.Map;%0A%0Aimport org.junit.Before;%0Aimport org.junit.Test;%0A%0Aimport com.microsoft.windowsazure.services.core.Builder;%0Aimport com.microsoft.windowsazure.services.core.Builder.Alteration;%0Aimport com.microsoft.windowsazure.services.core.Builder.Registry;%0Aimport com.microsoft.windowsazure.services.core.Configuration;%0Aimport com.microsoft.windowsazure.services.core.ServiceException;%0Aimport com.microsoft.windowsazure.services.management.models.ListAffinityGroupsResult;%0Aimport com.sun.jersey.api.client.Client;%0Aimport com.sun.jersey.api.client.filter.LoggingFilter;%0A%0Apublic class ManagementIntegrationTest extends IntegrationTestBase %7B%0A%0A    private ManagementContract service;%0A%0A    @Before%0A    public void createService() throws Exception %7B%0A        // reinitialize configuration from known state%0A        Configuration config = createConfiguration();%0A%0A        // add LoggingFilter to any pipeline that is created%0A        Registry builder = (Registry) config.getBuilder();%0A        builder.alter(Client.class, new Alteration%3CClient%3E() %7B%0A            @Override%0A            public Client alter(Client instance, Builder builder, Map%3CString, Object%3E properties) %7B%0A                instance.addFilter(new LoggingFilter());%0A                return instance;%0A            %7D%0A        %7D);%0A%0A        // applied as default configuration %0A        Configuration.setInstance(config);%0A        service = ManagementService.create();%0A    %7D%0A%0A    @Test%0A    public void createAffinityGroupSuccess() %7B%0A        // Arrange%0A        String subscriptionId = %2212345%22;%0A%0A        // Act%0A        // service.createAffinityGroup(subscriptionId);%0A%0A        // Assert%0A    %7D%0A%0A    @Test%0A    public void listAffinityGroupsSuccess() throws ServiceException %7B%0A        // Arrange %0A        String subscriptionId = %2212345%22;%0A%0A        // Act %0A        ListAffinityGroupsResult result = service.listAffinityGroups(subscriptionId);%0A%0A        // Assert%0A        assertNotNull(result);%0A%0A    %7D%0A%7D%0A

add management integration test.