ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jlun...@apache.org
Subject [47/52] [abbrv] ambari git commit: Revert "AMBARI-21077: Refactor API endpoint to have a single entry point for an API version (jluniya)"
Date Mon, 10 Jul 2017 19:57:19 GMT
http://git-wip-us.apache.org/repos/asf/ambari/blob/bf0bb2ea/ambari-server/src/test/java/org/apache/ambari/server/api/services/ClusterKerberosDescriptorServiceTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/api/services/ClusterKerberosDescriptorServiceTest.java b/ambari-server/src/test/java/org/apache/ambari/server/api/services/ClusterKerberosDescriptorServiceTest.java
index 47b70d9..ab83dfd 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/api/services/ClusterKerberosDescriptorServiceTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/api/services/ClusterKerberosDescriptorServiceTest.java
@@ -30,7 +30,6 @@ import javax.ws.rs.core.UriInfo;
 import org.apache.ambari.server.api.resources.ResourceInstance;
 import org.apache.ambari.server.api.services.parsers.RequestBodyParser;
 import org.apache.ambari.server.api.services.serializers.ResultSerializer;
-import org.apache.ambari.server.api.util.ApiVersion;
 
 /**
  * Unit tests for CredentialService.
@@ -65,7 +64,7 @@ public class ClusterKerberosDescriptorServiceTest extends BaseServiceTest {
     private String type;
 
     private TestService(String type) {
-      super(ApiVersion.Default, "C1");
+      super("C1");
       this.type = type;
     }
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/bf0bb2ea/ambari-server/src/test/java/org/apache/ambari/server/api/services/ClusterPrivilegeServiceTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/api/services/ClusterPrivilegeServiceTest.java b/ambari-server/src/test/java/org/apache/ambari/server/api/services/ClusterPrivilegeServiceTest.java
index 06f337e..a1c8d6c 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/api/services/ClusterPrivilegeServiceTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/api/services/ClusterPrivilegeServiceTest.java
@@ -28,7 +28,6 @@ import javax.ws.rs.core.UriInfo;
 import org.apache.ambari.server.api.resources.ResourceInstance;
 import org.apache.ambari.server.api.services.parsers.RequestBodyParser;
 import org.apache.ambari.server.api.services.serializers.ResultSerializer;
-import org.apache.ambari.server.api.util.ApiVersion;
 
 /**
  * Unit tests for ClusterPrivilegeService.
@@ -70,7 +69,7 @@ public class ClusterPrivilegeServiceTest extends BaseServiceTest {
   private class TestClusterPrivilegeService extends ClusterPrivilegeService {
 
     private TestClusterPrivilegeService(String clusterName) {
-      super(ApiVersion.Default, clusterName);
+      super(clusterName);
     }
 
     @Override

http://git-wip-us.apache.org/repos/asf/ambari/blob/bf0bb2ea/ambari-server/src/test/java/org/apache/ambari/server/api/services/ClusterServiceTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/api/services/ClusterServiceTest.java b/ambari-server/src/test/java/org/apache/ambari/server/api/services/ClusterServiceTest.java
index cfc6a2e..cfc43f5 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/api/services/ClusterServiceTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/api/services/ClusterServiceTest.java
@@ -30,7 +30,6 @@ import javax.ws.rs.core.UriInfo;
 import org.apache.ambari.server.api.resources.ResourceInstance;
 import org.apache.ambari.server.api.services.parsers.RequestBodyParser;
 import org.apache.ambari.server.api.services.serializers.ResultSerializer;
-import org.apache.ambari.server.api.util.ApiVersion;
 import org.apache.ambari.server.orm.dao.ClusterDAO;
 import org.apache.ambari.server.orm.dao.HostDAO;
 import org.apache.ambari.server.orm.entities.ClusterEntity;
@@ -146,7 +145,7 @@ public class ClusterServiceTest extends BaseServiceTest {
     private String m_clusterId;
 
     private TestClusterService(Clusters clusters, String clusterId) {
-      super(ApiVersion.Default, clusters);
+      super(clusters);
       m_clusterId = clusterId;
     }
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/bf0bb2ea/ambari-server/src/test/java/org/apache/ambari/server/api/services/ClusterStackVersionServiceTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/api/services/ClusterStackVersionServiceTest.java b/ambari-server/src/test/java/org/apache/ambari/server/api/services/ClusterStackVersionServiceTest.java
index fa21156..ac607fb 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/api/services/ClusterStackVersionServiceTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/api/services/ClusterStackVersionServiceTest.java
@@ -29,7 +29,6 @@ import javax.ws.rs.core.UriInfo;
 import org.apache.ambari.server.api.resources.ResourceInstance;
 import org.apache.ambari.server.api.services.parsers.RequestBodyParser;
 import org.apache.ambari.server.api.services.serializers.ResultSerializer;
-import org.apache.ambari.server.api.util.ApiVersion;
 import org.apache.ambari.server.controller.spi.Resource.Type;
 import org.easymock.EasyMock;
 import org.junit.Test;
@@ -73,7 +72,7 @@ public class ClusterStackVersionServiceTest extends BaseServiceTest {
 
   private class TestClusterStackVersionService extends ClusterStackVersionService {
     public TestClusterStackVersionService(String clusterName) {
-      super(ApiVersion.Default, clusterName);
+      super(clusterName);
     }
 
     @Override

http://git-wip-us.apache.org/repos/asf/ambari/blob/bf0bb2ea/ambari-server/src/test/java/org/apache/ambari/server/api/services/ComponentServiceTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/api/services/ComponentServiceTest.java b/ambari-server/src/test/java/org/apache/ambari/server/api/services/ComponentServiceTest.java
index dda130a..9ced9b3 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/api/services/ComponentServiceTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/api/services/ComponentServiceTest.java
@@ -32,7 +32,6 @@ import javax.ws.rs.core.UriInfo;
 import org.apache.ambari.server.api.resources.ResourceInstance;
 import org.apache.ambari.server.api.services.parsers.RequestBodyParser;
 import org.apache.ambari.server.api.services.serializers.ResultSerializer;
-import org.apache.ambari.server.api.util.ApiVersion;
 
 /**
  * Unit tests for ComponentService.
@@ -93,7 +92,7 @@ public class ComponentServiceTest extends BaseServiceTest {
     private String m_componentId;
 
     private TestComponentService(String clusterId, String serviceId, String componentId) {
-      super(ApiVersion.Default, clusterId, serviceId);
+      super(clusterId, serviceId);
       m_clusterId = clusterId;
       m_serviceId = serviceId;
       m_componentId = componentId;

http://git-wip-us.apache.org/repos/asf/ambari/blob/bf0bb2ea/ambari-server/src/test/java/org/apache/ambari/server/api/services/ConfigGroupServiceTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/api/services/ConfigGroupServiceTest.java b/ambari-server/src/test/java/org/apache/ambari/server/api/services/ConfigGroupServiceTest.java
index b0ad67c..88ee500 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/api/services/ConfigGroupServiceTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/api/services/ConfigGroupServiceTest.java
@@ -29,7 +29,6 @@ import javax.ws.rs.core.UriInfo;
 import org.apache.ambari.server.api.resources.ResourceInstance;
 import org.apache.ambari.server.api.services.parsers.RequestBodyParser;
 import org.apache.ambari.server.api.services.serializers.ResultSerializer;
-import org.apache.ambari.server.api.util.ApiVersion;
 
 public class ConfigGroupServiceTest extends BaseServiceTest {
 
@@ -86,7 +85,7 @@ public class ConfigGroupServiceTest extends BaseServiceTest {
     private String m_groupId;
 
     public TestConfigGroupService(String m_clusterName, String groupId) {
-      super(ApiVersion.Default, m_clusterName);
+      super(m_clusterName);
       this.m_clusterName = m_clusterName;
       this.m_groupId = groupId;
     }

http://git-wip-us.apache.org/repos/asf/ambari/blob/bf0bb2ea/ambari-server/src/test/java/org/apache/ambari/server/api/services/ConfigurationServiceTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/api/services/ConfigurationServiceTest.java b/ambari-server/src/test/java/org/apache/ambari/server/api/services/ConfigurationServiceTest.java
index eda6cc9..adaffff 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/api/services/ConfigurationServiceTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/api/services/ConfigurationServiceTest.java
@@ -29,7 +29,7 @@ import javax.ws.rs.core.UriInfo;
 import org.apache.ambari.server.api.resources.ResourceInstance;
 import org.apache.ambari.server.api.services.parsers.RequestBodyParser;
 import org.apache.ambari.server.api.services.serializers.ResultSerializer;
-import org.apache.ambari.server.api.util.ApiVersion;
+
 
 public class ConfigurationServiceTest extends BaseServiceTest {
 
@@ -56,7 +56,7 @@ public class ConfigurationServiceTest extends BaseServiceTest {
     private String m_clusterId;
 
     private TestConfigurationService(String clusterId) {
-      super(ApiVersion.Default, clusterId);
+      super(clusterId);
       m_clusterId = clusterId;
     }
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/bf0bb2ea/ambari-server/src/test/java/org/apache/ambari/server/api/services/CredentialServiceTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/api/services/CredentialServiceTest.java b/ambari-server/src/test/java/org/apache/ambari/server/api/services/CredentialServiceTest.java
index 8aa1303..73d3383 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/api/services/CredentialServiceTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/api/services/CredentialServiceTest.java
@@ -30,7 +30,6 @@ import javax.ws.rs.core.UriInfo;
 import org.apache.ambari.server.api.resources.ResourceInstance;
 import org.apache.ambari.server.api.services.parsers.RequestBodyParser;
 import org.apache.ambari.server.api.services.serializers.ResultSerializer;
-import org.apache.ambari.server.api.util.ApiVersion;
 
 /**
  * Unit tests for CredentialService.
@@ -73,7 +72,7 @@ public class CredentialServiceTest extends BaseServiceTest {
     private String alias;
 
     private TestCredentialService(String alias) {
-      super(ApiVersion.Default, "C1");
+      super("C1");
       this.alias = alias;
     }
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/bf0bb2ea/ambari-server/src/test/java/org/apache/ambari/server/api/services/ExtensionsServiceTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/api/services/ExtensionsServiceTest.java b/ambari-server/src/test/java/org/apache/ambari/server/api/services/ExtensionsServiceTest.java
index 00a028e..7a696a6 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/api/services/ExtensionsServiceTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/api/services/ExtensionsServiceTest.java
@@ -30,7 +30,6 @@ import javax.ws.rs.core.UriInfo;
 import org.apache.ambari.server.api.resources.ResourceInstance;
 import org.apache.ambari.server.api.services.parsers.RequestBodyParser;
 import org.apache.ambari.server.api.services.serializers.ResultSerializer;
-import org.apache.ambari.server.api.util.ApiVersion;
 
 /**
 * Unit tests for ExtensionsService.
@@ -74,7 +73,6 @@ public class ExtensionsServiceTest extends BaseServiceTest {
     private String m_extensionVersion;
 
     private TestExtensionsService(String extensionName, String extensionVersion) {
-      super(ApiVersion.Default);
       m_extensionId = extensionName;
       m_extensionVersion = extensionVersion;
     }

http://git-wip-us.apache.org/repos/asf/ambari/blob/bf0bb2ea/ambari-server/src/test/java/org/apache/ambari/server/api/services/FeedServiceTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/api/services/FeedServiceTest.java b/ambari-server/src/test/java/org/apache/ambari/server/api/services/FeedServiceTest.java
index 31e0edf..c899b93 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/api/services/FeedServiceTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/api/services/FeedServiceTest.java
@@ -30,7 +30,7 @@ import javax.ws.rs.core.UriInfo;
 import org.apache.ambari.server.api.resources.ResourceInstance;
 import org.apache.ambari.server.api.services.parsers.RequestBodyParser;
 import org.apache.ambari.server.api.services.serializers.ResultSerializer;
-import org.apache.ambari.server.api.util.ApiVersion;
+
 
 /**
  * Unit tests for FeedService.
@@ -79,7 +79,6 @@ public class FeedServiceTest extends BaseServiceTest {
     private String m_feedId;
 
     private TestFeedService(String feedId) {
-      super(ApiVersion.Default);
       m_feedId = feedId;
     }
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/bf0bb2ea/ambari-server/src/test/java/org/apache/ambari/server/api/services/GroupPrivilegeServiceTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/api/services/GroupPrivilegeServiceTest.java b/ambari-server/src/test/java/org/apache/ambari/server/api/services/GroupPrivilegeServiceTest.java
index 8cdbf75..89545a5 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/api/services/GroupPrivilegeServiceTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/api/services/GroupPrivilegeServiceTest.java
@@ -31,7 +31,6 @@ import javax.ws.rs.core.UriInfo;
 import org.apache.ambari.server.api.resources.ResourceInstance;
 import org.apache.ambari.server.api.services.parsers.RequestBodyParser;
 import org.apache.ambari.server.api.services.serializers.ResultSerializer;
-import org.apache.ambari.server.api.util.ApiVersion;
 import org.apache.ambari.server.controller.spi.Resource.Type;
 import org.easymock.EasyMock;
 import org.junit.Test;
@@ -86,7 +85,7 @@ public class GroupPrivilegeServiceTest extends BaseServiceTest {
   private class TestGroupPrivilegeService extends GroupPrivilegeService {
 
     public TestGroupPrivilegeService() {
-      super(ApiVersion.Default, "group");
+      super("group");
     }
 
     @Override

http://git-wip-us.apache.org/repos/asf/ambari/blob/bf0bb2ea/ambari-server/src/test/java/org/apache/ambari/server/api/services/GroupServiceTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/api/services/GroupServiceTest.java b/ambari-server/src/test/java/org/apache/ambari/server/api/services/GroupServiceTest.java
index 0753f1c..f46d358 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/api/services/GroupServiceTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/api/services/GroupServiceTest.java
@@ -29,7 +29,6 @@ import javax.ws.rs.core.UriInfo;
 import org.apache.ambari.server.api.resources.ResourceInstance;
 import org.apache.ambari.server.api.services.parsers.RequestBodyParser;
 import org.apache.ambari.server.api.services.serializers.ResultSerializer;
-import org.apache.ambari.server.api.util.ApiVersion;
 import org.apache.ambari.server.controller.spi.Resource.Type;
 
 /**
@@ -79,10 +78,6 @@ public class GroupServiceTest extends BaseServiceTest {
   }
 
   private class TestGroupService extends GroupService {
-    public TestGroupService() {
-      super(ApiVersion.Default);
-    }
-
     @Override
     protected ResourceInstance createResource(Type type, Map<Type, String> mapIds) {
       return getTestResource();

http://git-wip-us.apache.org/repos/asf/ambari/blob/bf0bb2ea/ambari-server/src/test/java/org/apache/ambari/server/api/services/HostComponentServiceTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/api/services/HostComponentServiceTest.java b/ambari-server/src/test/java/org/apache/ambari/server/api/services/HostComponentServiceTest.java
index 670eab1..01ccd6a 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/api/services/HostComponentServiceTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/api/services/HostComponentServiceTest.java
@@ -31,7 +31,6 @@ import javax.ws.rs.core.UriInfo;
 import org.apache.ambari.server.api.resources.ResourceInstance;
 import org.apache.ambari.server.api.services.parsers.RequestBodyParser;
 import org.apache.ambari.server.api.services.serializers.ResultSerializer;
-import org.apache.ambari.server.api.util.ApiVersion;
 
 /**
  * Unit tests for HostComponentService.
@@ -92,7 +91,7 @@ public class HostComponentServiceTest extends BaseServiceTest {
     private String m_hostComponentId;
 
     private TestHostComponentService(String clusterId, String hostId, String hostComponentId) {
-      super(ApiVersion.Default, clusterId, hostId);
+      super(clusterId, hostId);
       m_clusterId = clusterId;
       m_hostId = hostId;
       m_hostComponentId = hostComponentId;

http://git-wip-us.apache.org/repos/asf/ambari/blob/bf0bb2ea/ambari-server/src/test/java/org/apache/ambari/server/api/services/HostKerberosIdentityServiceTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/api/services/HostKerberosIdentityServiceTest.java b/ambari-server/src/test/java/org/apache/ambari/server/api/services/HostKerberosIdentityServiceTest.java
index 1550e0a..c9200b0 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/api/services/HostKerberosIdentityServiceTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/api/services/HostKerberosIdentityServiceTest.java
@@ -32,7 +32,6 @@ import javax.ws.rs.core.UriInfo;
 import org.apache.ambari.server.api.resources.ResourceInstance;
 import org.apache.ambari.server.api.services.parsers.RequestBodyParser;
 import org.apache.ambari.server.api.services.serializers.ResultSerializer;
-import org.apache.ambari.server.api.util.ApiVersion;
 
 /**
  * Unit tests for HostKerberosIdentity.
@@ -63,7 +62,7 @@ public class HostKerberosIdentityServiceTest extends BaseServiceTest {
     private String identityId;
 
     private TestHostKerberosIdentityService(String clusterId, String hostId, String identityId) {
-      super(ApiVersion.Default, clusterId, hostId);
+      super(clusterId, hostId);
       this.clusterId = clusterId;
       this.hostId = hostId;
       this.identityId = identityId;

http://git-wip-us.apache.org/repos/asf/ambari/blob/bf0bb2ea/ambari-server/src/test/java/org/apache/ambari/server/api/services/HostServiceTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/api/services/HostServiceTest.java b/ambari-server/src/test/java/org/apache/ambari/server/api/services/HostServiceTest.java
index 8209227..6aef04d 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/api/services/HostServiceTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/api/services/HostServiceTest.java
@@ -31,7 +31,6 @@ import javax.ws.rs.core.UriInfo;
 import org.apache.ambari.server.api.resources.ResourceInstance;
 import org.apache.ambari.server.api.services.parsers.RequestBodyParser;
 import org.apache.ambari.server.api.services.serializers.ResultSerializer;
-import org.apache.ambari.server.api.util.ApiVersion;
 
 /**
  * Unit tests for HostService.
@@ -91,7 +90,7 @@ public class HostServiceTest extends BaseServiceTest {
     private String m_hostId;
 
     private TestHostService(String clusterId, String hostId) {
-      super(ApiVersion.Default, clusterId);
+      super(clusterId);
       m_clusterId = clusterId;
       m_hostId = hostId;
     }

http://git-wip-us.apache.org/repos/asf/ambari/blob/bf0bb2ea/ambari-server/src/test/java/org/apache/ambari/server/api/services/HostStackVersionServiceTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/api/services/HostStackVersionServiceTest.java b/ambari-server/src/test/java/org/apache/ambari/server/api/services/HostStackVersionServiceTest.java
index 83de4e3..8367a94 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/api/services/HostStackVersionServiceTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/api/services/HostStackVersionServiceTest.java
@@ -29,7 +29,6 @@ import javax.ws.rs.core.UriInfo;
 import org.apache.ambari.server.api.resources.ResourceInstance;
 import org.apache.ambari.server.api.services.parsers.RequestBodyParser;
 import org.apache.ambari.server.api.services.serializers.ResultSerializer;
-import org.apache.ambari.server.api.util.ApiVersion;
 import org.apache.ambari.server.controller.spi.Resource.Type;
 
 /**
@@ -61,7 +60,7 @@ public class HostStackVersionServiceTest extends BaseServiceTest {
 
   private class TestHostStackVersionService extends HostStackVersionService {
     public TestHostStackVersionService(String hostName, String clusterName) {
-      super(ApiVersion.Default, hostName, clusterName);
+      super(hostName, clusterName);
     }
 
     @Override

http://git-wip-us.apache.org/repos/asf/ambari/blob/bf0bb2ea/ambari-server/src/test/java/org/apache/ambari/server/api/services/InstanceServiceTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/api/services/InstanceServiceTest.java b/ambari-server/src/test/java/org/apache/ambari/server/api/services/InstanceServiceTest.java
index 8f0e004..ee42b57 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/api/services/InstanceServiceTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/api/services/InstanceServiceTest.java
@@ -31,7 +31,6 @@ import javax.ws.rs.core.UriInfo;
 import org.apache.ambari.server.api.resources.ResourceInstance;
 import org.apache.ambari.server.api.services.parsers.RequestBodyParser;
 import org.apache.ambari.server.api.services.serializers.ResultSerializer;
-import org.apache.ambari.server.api.util.ApiVersion;
 
 /**
  * Unit tests for InstanceService.
@@ -79,7 +78,7 @@ public class InstanceServiceTest extends BaseServiceTest {
     private String m_instanceId;
 
     private TestInstanceService(String feedName, String instanceId) {
-      super(ApiVersion.Default, feedName);
+      super(feedName);
       m_feedName = feedName;
       m_instanceId = instanceId;
     }

http://git-wip-us.apache.org/repos/asf/ambari/blob/bf0bb2ea/ambari-server/src/test/java/org/apache/ambari/server/api/services/JobServiceTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/api/services/JobServiceTest.java b/ambari-server/src/test/java/org/apache/ambari/server/api/services/JobServiceTest.java
index 1c7c01b..128b345 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/api/services/JobServiceTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/api/services/JobServiceTest.java
@@ -28,7 +28,6 @@ import javax.ws.rs.core.UriInfo;
 import org.apache.ambari.server.api.resources.ResourceInstance;
 import org.apache.ambari.server.api.services.parsers.RequestBodyParser;
 import org.apache.ambari.server.api.services.serializers.ResultSerializer;
-import org.apache.ambari.server.api.util.ApiVersion;
 
 /**
  * Unit tests for JobService.
@@ -63,7 +62,7 @@ public class JobServiceTest extends BaseServiceTest {
     private String clusterName;
 
     public TestJobService(String clusterName, String workflowId) {
-      super(ApiVersion.Default, clusterName, workflowId);
+      super(clusterName, workflowId);
       this.clusterName = clusterName;
       this.workflowId = workflowId;
     }

http://git-wip-us.apache.org/repos/asf/ambari/blob/bf0bb2ea/ambari-server/src/test/java/org/apache/ambari/server/api/services/LdapSyncEventServiceTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/api/services/LdapSyncEventServiceTest.java b/ambari-server/src/test/java/org/apache/ambari/server/api/services/LdapSyncEventServiceTest.java
index e129aff..9085bf5 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/api/services/LdapSyncEventServiceTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/api/services/LdapSyncEventServiceTest.java
@@ -29,7 +29,6 @@ import javax.ws.rs.core.UriInfo;
 import org.apache.ambari.server.api.resources.ResourceInstance;
 import org.apache.ambari.server.api.services.parsers.RequestBodyParser;
 import org.apache.ambari.server.api.services.serializers.ResultSerializer;
-import org.apache.ambari.server.api.util.ApiVersion;
 import org.apache.ambari.server.controller.spi.Resource;
 
 /**
@@ -71,7 +70,7 @@ public class LdapSyncEventServiceTest extends BaseServiceTest {
   private class TestLdapSyncEventService extends LdapSyncEventService {
 
     private TestLdapSyncEventService() {
-      super(ApiVersion.Default);
+      super();
     }
 
     @Override

http://git-wip-us.apache.org/repos/asf/ambari/blob/bf0bb2ea/ambari-server/src/test/java/org/apache/ambari/server/api/services/LoggingServiceTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/api/services/LoggingServiceTest.java b/ambari-server/src/test/java/org/apache/ambari/server/api/services/LoggingServiceTest.java
index 183ea3f..800aca2 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/api/services/LoggingServiceTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/api/services/LoggingServiceTest.java
@@ -26,7 +26,6 @@ import java.net.HttpURLConnection;
 import javax.ws.rs.core.Response;
 import javax.ws.rs.core.UriInfo;
 
-import org.apache.ambari.server.api.util.ApiVersion;
 import org.apache.ambari.server.controller.AmbariManagementController;
 import org.apache.ambari.server.controller.logging.LoggingRequestHelperFactory;
 import org.apache.ambari.server.security.TestAuthenticationFactory;
@@ -126,7 +125,7 @@ public class LoggingServiceTest {
     SecurityContextHolder.getContext().setAuthentication(authentication);
 
     LoggingService loggingService =
-      new LoggingService(ApiVersion.Default, expectedClusterName, controllerFactoryMock);
+      new LoggingService(expectedClusterName, controllerFactoryMock);
     loggingService.setLoggingRequestHelperFactory(helperFactoryMock);
 
     Response resource = loggingService.getSearchEngine("", null, uriInfoMock);

http://git-wip-us.apache.org/repos/asf/ambari/blob/bf0bb2ea/ambari-server/src/test/java/org/apache/ambari/server/api/services/MemberServiceTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/api/services/MemberServiceTest.java b/ambari-server/src/test/java/org/apache/ambari/server/api/services/MemberServiceTest.java
index 9f9e31c..f9543df 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/api/services/MemberServiceTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/api/services/MemberServiceTest.java
@@ -29,7 +29,6 @@ import javax.ws.rs.core.UriInfo;
 import org.apache.ambari.server.api.resources.ResourceInstance;
 import org.apache.ambari.server.api.services.parsers.RequestBodyParser;
 import org.apache.ambari.server.api.services.serializers.ResultSerializer;
-import org.apache.ambari.server.api.util.ApiVersion;
 import org.apache.ambari.server.controller.spi.Resource.Type;
 
 /**
@@ -85,7 +84,7 @@ public class MemberServiceTest extends BaseServiceTest {
 
   private class TestMemberService extends MemberService {
     public TestMemberService(String groupName) {
-      super(ApiVersion.Default, groupName);
+      super(groupName);
     }
 
     @Override

http://git-wip-us.apache.org/repos/asf/ambari/blob/bf0bb2ea/ambari-server/src/test/java/org/apache/ambari/server/api/services/PermissionServiceTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/api/services/PermissionServiceTest.java b/ambari-server/src/test/java/org/apache/ambari/server/api/services/PermissionServiceTest.java
index bf64c4f..bbb4578 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/api/services/PermissionServiceTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/api/services/PermissionServiceTest.java
@@ -30,7 +30,7 @@ import javax.ws.rs.core.UriInfo;
 import org.apache.ambari.server.api.resources.ResourceInstance;
 import org.apache.ambari.server.api.services.parsers.RequestBodyParser;
 import org.apache.ambari.server.api.services.serializers.ResultSerializer;
-import org.apache.ambari.server.api.util.ApiVersion;
+
 
 /**
  * Unit tests for PermissionService.
@@ -78,7 +78,6 @@ public class PermissionServiceTest extends BaseServiceTest {
     private String id;
 
     private TestPermissionService(String id) {
-      super(ApiVersion.Default);
       this.id = id;
     }
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/bf0bb2ea/ambari-server/src/test/java/org/apache/ambari/server/api/services/PreUpgradeCheckServiceTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/api/services/PreUpgradeCheckServiceTest.java b/ambari-server/src/test/java/org/apache/ambari/server/api/services/PreUpgradeCheckServiceTest.java
index 4be5f7c..23c99d9 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/api/services/PreUpgradeCheckServiceTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/api/services/PreUpgradeCheckServiceTest.java
@@ -29,7 +29,6 @@ import javax.ws.rs.core.UriInfo;
 import org.apache.ambari.server.api.resources.ResourceInstance;
 import org.apache.ambari.server.api.services.parsers.RequestBodyParser;
 import org.apache.ambari.server.api.services.serializers.ResultSerializer;
-import org.apache.ambari.server.api.util.ApiVersion;
 import org.apache.ambari.server.controller.spi.Resource.Type;
 
 /**
@@ -57,7 +56,7 @@ public class PreUpgradeCheckServiceTest extends BaseServiceTest {
   private class TestPreUpgradeCheckService extends PreUpgradeCheckService {
 
     public TestPreUpgradeCheckService(String clusterName) {
-      super(ApiVersion.Default, clusterName);
+      super(clusterName);
     }
 
     @Override

http://git-wip-us.apache.org/repos/asf/ambari/blob/bf0bb2ea/ambari-server/src/test/java/org/apache/ambari/server/api/services/PrivilegeServiceTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/api/services/PrivilegeServiceTest.java b/ambari-server/src/test/java/org/apache/ambari/server/api/services/PrivilegeServiceTest.java
index 23e644a..134c753 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/api/services/PrivilegeServiceTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/api/services/PrivilegeServiceTest.java
@@ -30,7 +30,7 @@ import javax.ws.rs.core.UriInfo;
 import org.apache.ambari.server.api.resources.ResourceInstance;
 import org.apache.ambari.server.api.services.parsers.RequestBodyParser;
 import org.apache.ambari.server.api.services.serializers.ResultSerializer;
-import org.apache.ambari.server.api.util.ApiVersion;
+
 
 /**
  * Unit tests for PrivilegeService.
@@ -91,7 +91,6 @@ public class PrivilegeServiceTest extends BaseServiceTest {
     private String id;
 
     private TestPrivilegeService(String id) {
-      super(ApiVersion.Default);
       this.id = id;
     }
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/bf0bb2ea/ambari-server/src/test/java/org/apache/ambari/server/api/services/RecommendationServiceTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/api/services/RecommendationServiceTest.java b/ambari-server/src/test/java/org/apache/ambari/server/api/services/RecommendationServiceTest.java
index eb5c92b..779a320 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/api/services/RecommendationServiceTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/api/services/RecommendationServiceTest.java
@@ -30,7 +30,6 @@ import javax.ws.rs.core.UriInfo;
 import org.apache.ambari.server.api.resources.ResourceInstance;
 import org.apache.ambari.server.api.services.parsers.RequestBodyParser;
 import org.apache.ambari.server.api.services.serializers.ResultSerializer;
-import org.apache.ambari.server.api.util.ApiVersion;
 
 /**
  * Unit tests for RecommendationService.
@@ -43,8 +42,8 @@ public class RecommendationServiceTest extends BaseServiceTest {
 
     //getRecommendation
     RecommendationService service = new TestRecommendationService("stackName", "stackVersion");
-    Method m = service.getClass().getMethod("getRecommendation", String.class, HttpHeaders.class, UriInfo.class);
-    Object[] args = new Object[] {"body", getHttpHeaders(), getUriInfo()};
+    Method m = service.getClass().getMethod("getRecommendation", String.class, HttpHeaders.class, UriInfo.class, String.class, String.class);
+    Object[] args = new Object[] {"body", getHttpHeaders(), getUriInfo(), "stackName", "stackVersion"};
     listInvocations.add(new ServiceTestInvocation(Request.Type.POST, service, m, args, "body"));
 
     return listInvocations;
@@ -55,7 +54,7 @@ public class RecommendationServiceTest extends BaseServiceTest {
     private String stackVersion;
 
     private TestRecommendationService(String stackName, String stackVersion) {
-      super(ApiVersion.Default, stackName, stackVersion);
+      super();
       this.stackName = stackName;
       this.stackVersion = stackVersion;
     }

http://git-wip-us.apache.org/repos/asf/ambari/blob/bf0bb2ea/ambari-server/src/test/java/org/apache/ambari/server/api/services/RepositoryServiceTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/api/services/RepositoryServiceTest.java b/ambari-server/src/test/java/org/apache/ambari/server/api/services/RepositoryServiceTest.java
index e035947..6d6ba7b 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/api/services/RepositoryServiceTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/api/services/RepositoryServiceTest.java
@@ -30,7 +30,6 @@ import javax.ws.rs.core.UriInfo;
 import org.apache.ambari.server.api.resources.ResourceInstance;
 import org.apache.ambari.server.api.services.parsers.RequestBodyParser;
 import org.apache.ambari.server.api.services.serializers.ResultSerializer;
-import org.apache.ambari.server.api.util.ApiVersion;
 import org.apache.ambari.server.controller.spi.Resource.Type;
 
 /**
@@ -82,7 +81,7 @@ public class RepositoryServiceTest extends BaseServiceTest {
   private class TestRepositoryService extends RepositoryService {
 
     public TestRepositoryService() {
-      super(ApiVersion.Default, new HashMap<Type, String>());
+      super(new HashMap<Type, String>());
     }
 
     @Override

http://git-wip-us.apache.org/repos/asf/ambari/blob/bf0bb2ea/ambari-server/src/test/java/org/apache/ambari/server/api/services/RoleAuthorizationServiceTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/api/services/RoleAuthorizationServiceTest.java b/ambari-server/src/test/java/org/apache/ambari/server/api/services/RoleAuthorizationServiceTest.java
index 063fa05..517a6a0 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/api/services/RoleAuthorizationServiceTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/api/services/RoleAuthorizationServiceTest.java
@@ -30,7 +30,7 @@ import javax.ws.rs.core.UriInfo;
 import org.apache.ambari.server.api.resources.ResourceInstance;
 import org.apache.ambari.server.api.services.parsers.RequestBodyParser;
 import org.apache.ambari.server.api.services.serializers.ResultSerializer;
-import org.apache.ambari.server.api.util.ApiVersion;
+
 
 /**
  * Unit tests for RoleAuthorizationService.
@@ -60,7 +60,6 @@ public class RoleAuthorizationServiceTest extends BaseServiceTest {
     private String id;
 
     private TestRoleAuthorizationService(String id) {
-      super(ApiVersion.Default);
       this.id = id;
     }
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/bf0bb2ea/ambari-server/src/test/java/org/apache/ambari/server/api/services/RootServiceServiceTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/api/services/RootServiceServiceTest.java b/ambari-server/src/test/java/org/apache/ambari/server/api/services/RootServiceServiceTest.java
index b2598c6..64898c8 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/api/services/RootServiceServiceTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/api/services/RootServiceServiceTest.java
@@ -30,7 +30,6 @@ import javax.ws.rs.core.UriInfo;
 import org.apache.ambari.server.api.resources.ResourceInstance;
 import org.apache.ambari.server.api.services.parsers.RequestBodyParser;
 import org.apache.ambari.server.api.services.serializers.ResultSerializer;
-import org.apache.ambari.server.api.util.ApiVersion;
 
 /**
 * Unit tests for RootServiceService.
@@ -94,7 +93,6 @@ public class RootServiceServiceTest extends BaseServiceTest {
     private String m_hostName;
 
     private TestRootServiceService(String serviceName, String componentName, String hostName) {
-      super(ApiVersion.Default);
       m_serviceName = serviceName;
       m_componentName = componentName;
       m_hostName = hostName;

http://git-wip-us.apache.org/repos/asf/ambari/blob/bf0bb2ea/ambari-server/src/test/java/org/apache/ambari/server/api/services/ServiceServiceTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/api/services/ServiceServiceTest.java b/ambari-server/src/test/java/org/apache/ambari/server/api/services/ServiceServiceTest.java
index ddb22eb..deda3eb 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/api/services/ServiceServiceTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/api/services/ServiceServiceTest.java
@@ -30,7 +30,6 @@ import javax.ws.rs.core.UriInfo;
 import org.apache.ambari.server.api.resources.ResourceInstance;
 import org.apache.ambari.server.api.services.parsers.RequestBodyParser;
 import org.apache.ambari.server.api.services.serializers.ResultSerializer;
-import org.apache.ambari.server.api.util.ApiVersion;
 
 /**
  * Unit tests for ServiceService.
@@ -134,13 +133,13 @@ public class ServiceServiceTest extends BaseServiceTest {
     private String m_artifact_id;
 
     private TestServiceService(String clusterId, String serviceId) {
-      super(ApiVersion.Default, clusterId);
+      super(clusterId);
       m_clusterId = clusterId;
       m_serviceId = serviceId;
     }
 
     private TestServiceService(String clusterId, String serviceId, String artifactId) {
-      super(ApiVersion.Default, clusterId);
+      super(clusterId);
       m_clusterId = clusterId;
       m_serviceId = serviceId;
       m_artifact_id = artifactId;

http://git-wip-us.apache.org/repos/asf/ambari/blob/bf0bb2ea/ambari-server/src/test/java/org/apache/ambari/server/api/services/SettingServiceTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/api/services/SettingServiceTest.java b/ambari-server/src/test/java/org/apache/ambari/server/api/services/SettingServiceTest.java
index c53b852..1bc75ff 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/api/services/SettingServiceTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/api/services/SettingServiceTest.java
@@ -29,7 +29,6 @@ import javax.ws.rs.core.UriInfo;
 import org.apache.ambari.server.api.resources.ResourceInstance;
 import org.apache.ambari.server.api.services.parsers.RequestBodyParser;
 import org.apache.ambari.server.api.services.serializers.ResultSerializer;
-import org.apache.ambari.server.api.util.ApiVersion;
 
 /**
  * Unit test for {@link SettingService}
@@ -76,7 +75,6 @@ public class SettingServiceTest extends BaseServiceTest {
     private String settingName;
 
     private TestSettingService(String settingName) {
-      super(ApiVersion.Default);
       this.settingName = settingName;
     }
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/bf0bb2ea/ambari-server/src/test/java/org/apache/ambari/server/api/services/StacksServiceTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/api/services/StacksServiceTest.java b/ambari-server/src/test/java/org/apache/ambari/server/api/services/StacksServiceTest.java
index b828879..ff62712 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/api/services/StacksServiceTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/api/services/StacksServiceTest.java
@@ -30,7 +30,6 @@ import javax.ws.rs.core.UriInfo;
 import org.apache.ambari.server.api.resources.ResourceInstance;
 import org.apache.ambari.server.api.services.parsers.RequestBodyParser;
 import org.apache.ambari.server.api.services.serializers.ResultSerializer;
-import org.apache.ambari.server.api.util.ApiVersion;
 
 /**
 * Unit tests for StacksService.
@@ -142,7 +141,6 @@ public class StacksServiceTest extends BaseServiceTest {
     private String m_stackVersion;
 
     private TestStacksService(String stackName, String stackVersion) {
-      super(ApiVersion.Default);
       m_stackId = stackName;
       m_stackVersion = stackVersion;
     }

http://git-wip-us.apache.org/repos/asf/ambari/blob/bf0bb2ea/ambari-server/src/test/java/org/apache/ambari/server/api/services/TargetClusterServiceTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/api/services/TargetClusterServiceTest.java b/ambari-server/src/test/java/org/apache/ambari/server/api/services/TargetClusterServiceTest.java
index 2b72570..a71b062 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/api/services/TargetClusterServiceTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/api/services/TargetClusterServiceTest.java
@@ -30,7 +30,7 @@ import javax.ws.rs.core.UriInfo;
 import org.apache.ambari.server.api.resources.ResourceInstance;
 import org.apache.ambari.server.api.services.parsers.RequestBodyParser;
 import org.apache.ambari.server.api.services.serializers.ResultSerializer;
-import org.apache.ambari.server.api.util.ApiVersion;
+
 
 /**
  * Unit tests for TargetClusterService.
@@ -79,7 +79,6 @@ public class TargetClusterServiceTest extends BaseServiceTest {
     private String m_targetClusterId;
 
     private TestTargetClusterService(String targetClusterId) {
-      super(ApiVersion.Default);
       m_targetClusterId = targetClusterId;
     }
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/bf0bb2ea/ambari-server/src/test/java/org/apache/ambari/server/api/services/TaskAttemptServiceTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/api/services/TaskAttemptServiceTest.java b/ambari-server/src/test/java/org/apache/ambari/server/api/services/TaskAttemptServiceTest.java
index 0d41be7..072cd65 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/api/services/TaskAttemptServiceTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/api/services/TaskAttemptServiceTest.java
@@ -28,7 +28,6 @@ import javax.ws.rs.core.UriInfo;
 import org.apache.ambari.server.api.resources.ResourceInstance;
 import org.apache.ambari.server.api.services.parsers.RequestBodyParser;
 import org.apache.ambari.server.api.services.serializers.ResultSerializer;
-import org.apache.ambari.server.api.util.ApiVersion;
 
 /**
  * Unit tests for TaskAttemptService.
@@ -66,7 +65,7 @@ public class TaskAttemptServiceTest extends BaseServiceTest {
 
     public TestTaskAttemptService(String clusterName, String workflowId,
         String jobId) {
-      super(ApiVersion.Default, clusterName, workflowId, jobId);
+      super(clusterName, workflowId, jobId);
       this.clusterName = clusterName;
       this.workflowId = workflowId;
       this.jobId = jobId;

http://git-wip-us.apache.org/repos/asf/ambari/blob/bf0bb2ea/ambari-server/src/test/java/org/apache/ambari/server/api/services/UpgradeItemServiceTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/api/services/UpgradeItemServiceTest.java b/ambari-server/src/test/java/org/apache/ambari/server/api/services/UpgradeItemServiceTest.java
index 4bd7dde..25f67a4 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/api/services/UpgradeItemServiceTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/api/services/UpgradeItemServiceTest.java
@@ -28,7 +28,6 @@ import javax.ws.rs.core.UriInfo;
 import org.apache.ambari.server.api.resources.ResourceInstance;
 import org.apache.ambari.server.api.services.parsers.RequestBodyParser;
 import org.apache.ambari.server.api.services.serializers.ResultSerializer;
-import org.apache.ambari.server.api.util.ApiVersion;
 import org.junit.Assert;
 
 /**
@@ -51,7 +50,7 @@ public class UpgradeItemServiceTest extends BaseServiceTest {
     private Long m_upgradeItemId;
 
     private TestUpgradeItemService(String clusterName, String upgradeId, String upgradeGroupId, Long upgradeItemId) {
-      super(ApiVersion.Default, clusterName, upgradeId, upgradeGroupId);
+      super(clusterName, upgradeId, upgradeGroupId);
 
       m_upgradeItemId = upgradeItemId;
     }

http://git-wip-us.apache.org/repos/asf/ambari/blob/bf0bb2ea/ambari-server/src/test/java/org/apache/ambari/server/api/services/UserAuthorizationServiceTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/api/services/UserAuthorizationServiceTest.java b/ambari-server/src/test/java/org/apache/ambari/server/api/services/UserAuthorizationServiceTest.java
index bf712c8..c0fb6ff 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/api/services/UserAuthorizationServiceTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/api/services/UserAuthorizationServiceTest.java
@@ -30,7 +30,6 @@ import javax.ws.rs.core.UriInfo;
 import org.apache.ambari.server.api.resources.ResourceInstance;
 import org.apache.ambari.server.api.services.parsers.RequestBodyParser;
 import org.apache.ambari.server.api.services.serializers.ResultSerializer;
-import org.apache.ambari.server.api.util.ApiVersion;
 import org.apache.ambari.server.controller.spi.Resource;
 import org.junit.Test;
 
@@ -61,7 +60,7 @@ public class UserAuthorizationServiceTest extends BaseServiceTest {
   @Test
   public void testCreateAuthorizationResourceWithUppercaseUsername() {
     // GIVEN
-    UserAuthorizationService userAuthorizationService= new UserAuthorizationService(ApiVersion.Default, "Jdoe");
+    UserAuthorizationService userAuthorizationService= new UserAuthorizationService("Jdoe");
     // WHEN
     ResourceInstance result = userAuthorizationService.createAuthorizationResource("id");
     // THEN
@@ -73,7 +72,7 @@ public class UserAuthorizationServiceTest extends BaseServiceTest {
     private String id;
 
     private TestUserAuthorizationService(String id) {
-      super(ApiVersion.Default, "jdoe");
+      super("jdoe");
       this.id = id;
     }
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/bf0bb2ea/ambari-server/src/test/java/org/apache/ambari/server/api/services/UserPrivilegeServiceTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/api/services/UserPrivilegeServiceTest.java b/ambari-server/src/test/java/org/apache/ambari/server/api/services/UserPrivilegeServiceTest.java
index 23e1062..909a4ba 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/api/services/UserPrivilegeServiceTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/api/services/UserPrivilegeServiceTest.java
@@ -33,7 +33,6 @@ import javax.ws.rs.core.UriInfo;
 import org.apache.ambari.server.api.resources.ResourceInstance;
 import org.apache.ambari.server.api.services.parsers.RequestBodyParser;
 import org.apache.ambari.server.api.services.serializers.ResultSerializer;
-import org.apache.ambari.server.api.util.ApiVersion;
 import org.apache.ambari.server.controller.spi.Resource;
 import org.apache.ambari.server.controller.spi.Resource.Type;
 import org.easymock.EasyMock;
@@ -89,7 +88,7 @@ public class UserPrivilegeServiceTest extends BaseServiceTest {
   @Test
   public void testCreatePrivilegeResourcesWithUppercaseUsername() {
     // GIVEN
-    UserPrivilegeService userPrivilegeService = new UserPrivilegeService(ApiVersion.Default, "User");
+    UserPrivilegeService userPrivilegeService = new UserPrivilegeService("User");
     // WHEN
     ResourceInstance result = userPrivilegeService.createPrivilegeResource("test");
     // THEN
@@ -99,7 +98,7 @@ public class UserPrivilegeServiceTest extends BaseServiceTest {
   private class TestUserPrivilegeService extends UserPrivilegeService {
 
     public TestUserPrivilegeService() {
-      super(ApiVersion.Default, "user");
+      super("user");
     }
 
     @Override

http://git-wip-us.apache.org/repos/asf/ambari/blob/bf0bb2ea/ambari-server/src/test/java/org/apache/ambari/server/api/services/ValidationServiceTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/api/services/ValidationServiceTest.java b/ambari-server/src/test/java/org/apache/ambari/server/api/services/ValidationServiceTest.java
index ef6aef0..722e4bc 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/api/services/ValidationServiceTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/api/services/ValidationServiceTest.java
@@ -30,7 +30,6 @@ import javax.ws.rs.core.UriInfo;
 import org.apache.ambari.server.api.resources.ResourceInstance;
 import org.apache.ambari.server.api.services.parsers.RequestBodyParser;
 import org.apache.ambari.server.api.services.serializers.ResultSerializer;
-import org.apache.ambari.server.api.util.ApiVersion;
 
 /**
  * Unit tests for ValidationService.
@@ -43,8 +42,8 @@ public class ValidationServiceTest extends BaseServiceTest {
 
     //getValidation
     ValidationService service = new TestValidationService("stackName", "stackVersion");
-    Method m = service.getClass().getMethod("getValidation", String.class, HttpHeaders.class, UriInfo.class);
-    Object[] args = new Object[] {"body", getHttpHeaders(), getUriInfo()};
+    Method m = service.getClass().getMethod("getValidation", String.class, HttpHeaders.class, UriInfo.class, String.class, String.class);
+    Object[] args = new Object[] {"body", getHttpHeaders(), getUriInfo(), "stackName", "stackVersion"};
     listInvocations.add(new ServiceTestInvocation(Request.Type.POST, service, m, args, "body"));
 
     return listInvocations;
@@ -55,7 +54,7 @@ public class ValidationServiceTest extends BaseServiceTest {
     private String stackVersion;
 
     private TestValidationService(String stackName, String stackVersion) {
-      super(ApiVersion.Default, stackName, stackVersion);
+      super();
       this.stackName = stackName;
       this.stackVersion = stackVersion;
     }

http://git-wip-us.apache.org/repos/asf/ambari/blob/bf0bb2ea/ambari-server/src/test/java/org/apache/ambari/server/api/services/ViewDataMigrationServiceTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/api/services/ViewDataMigrationServiceTest.java b/ambari-server/src/test/java/org/apache/ambari/server/api/services/ViewDataMigrationServiceTest.java
index 2672410..e1eb0de 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/api/services/ViewDataMigrationServiceTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/api/services/ViewDataMigrationServiceTest.java
@@ -27,7 +27,6 @@ import static org.easymock.EasyMock.verify;
 
 import javax.ws.rs.WebApplicationException;
 
-import org.apache.ambari.server.api.util.ApiVersion;
 import org.apache.ambari.server.orm.entities.ViewInstanceEntity;
 import org.apache.ambari.server.view.ViewDataMigrationUtility;
 import org.apache.ambari.server.view.ViewRegistry;
@@ -55,7 +54,7 @@ public class ViewDataMigrationServiceTest {
     replay(viewRegistry);
     ViewRegistry.initInstance(viewRegistry);
 
-    ViewDataMigrationService service = new ViewDataMigrationService(ApiVersion.Default, viewName, version1, instanceName);
+    ViewDataMigrationService service = new ViewDataMigrationService(viewName, version1, instanceName);
 
     ViewDataMigrationUtility migrationUtility = createStrictMock(ViewDataMigrationUtility.class);
     migrationUtility.migrateData(anyObject(ViewInstanceEntity.class), anyObject(ViewInstanceEntity.class), eq(false));
@@ -74,7 +73,7 @@ public class ViewDataMigrationServiceTest {
     replay(viewRegistry);
     ViewRegistry.initInstance(viewRegistry);
 
-    ViewDataMigrationService service = new ViewDataMigrationService(ApiVersion.Default, viewName, version1, instanceName);
+    ViewDataMigrationService service = new ViewDataMigrationService(viewName, version1, instanceName);
 
     thrown.expect(WebApplicationException.class);
     service.migrateData(version2, instanceName);

http://git-wip-us.apache.org/repos/asf/ambari/blob/bf0bb2ea/ambari-server/src/test/java/org/apache/ambari/server/api/services/ViewExternalSubResourceServiceTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/api/services/ViewExternalSubResourceServiceTest.java b/ambari-server/src/test/java/org/apache/ambari/server/api/services/ViewExternalSubResourceServiceTest.java
index 74711e6..155f91e 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/api/services/ViewExternalSubResourceServiceTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/api/services/ViewExternalSubResourceServiceTest.java
@@ -17,7 +17,6 @@
  */
 package org.apache.ambari.server.api.services;
 
-import org.apache.ambari.server.api.util.ApiVersion;
 import org.apache.ambari.server.controller.spi.Resource;
 import org.apache.ambari.server.orm.entities.ViewInstanceEntity;
 import org.apache.ambari.server.orm.entities.ViewInstanceEntityTest;
@@ -33,7 +32,7 @@ public class ViewExternalSubResourceServiceTest {
     Resource.Type type = new Resource.Type("resource");
 
     ViewInstanceEntity definition = ViewInstanceEntityTest.getViewInstanceEntity();
-    ViewExternalSubResourceService service = new ViewExternalSubResourceService(ApiVersion.Default, type, definition);
+    ViewExternalSubResourceService service = new ViewExternalSubResourceService(type, definition);
 
     Object fooService = new Object();
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/bf0bb2ea/ambari-server/src/test/java/org/apache/ambari/server/api/services/ViewPermissionServiceTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/api/services/ViewPermissionServiceTest.java b/ambari-server/src/test/java/org/apache/ambari/server/api/services/ViewPermissionServiceTest.java
index befa939..1c9e589 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/api/services/ViewPermissionServiceTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/api/services/ViewPermissionServiceTest.java
@@ -30,7 +30,6 @@ import javax.ws.rs.core.UriInfo;
 import org.apache.ambari.server.api.resources.ResourceInstance;
 import org.apache.ambari.server.api.services.parsers.RequestBodyParser;
 import org.apache.ambari.server.api.services.serializers.ResultSerializer;
-import org.apache.ambari.server.api.util.ApiVersion;
 
 /**
  * Unit tests for ViewPermissionService.
@@ -74,7 +73,7 @@ public class ViewPermissionServiceTest extends BaseServiceTest {
 
     private TestViewPermissionService(String viewName, String version, String permissionId) {
 
-      super(ApiVersion.Default, viewName, version);
+      super(viewName, version);
       this.permissionId = permissionId;
     }
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/bf0bb2ea/ambari-server/src/test/java/org/apache/ambari/server/api/services/ViewSubResourceServiceTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/api/services/ViewSubResourceServiceTest.java b/ambari-server/src/test/java/org/apache/ambari/server/api/services/ViewSubResourceServiceTest.java
index 6c23960..97943df 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/api/services/ViewSubResourceServiceTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/api/services/ViewSubResourceServiceTest.java
@@ -43,7 +43,6 @@ import javax.ws.rs.core.UriInfo;
 import org.apache.ambari.server.api.resources.ResourceInstance;
 import org.apache.ambari.server.api.services.parsers.RequestBodyParser;
 import org.apache.ambari.server.api.services.serializers.ResultSerializer;
-import org.apache.ambari.server.api.util.ApiVersion;
 import org.apache.ambari.server.api.util.TreeNode;
 import org.apache.ambari.server.controller.spi.Resource;
 import org.apache.ambari.server.orm.entities.ViewInstanceEntity;
@@ -133,7 +132,7 @@ public class ViewSubResourceServiceTest extends BaseServiceTest {
     Resource.Type type = new Resource.Type("subResource");
 
     // get resource
-    ViewSubResourceService service = new ViewSubResourceService(ApiVersion.Default, type, viewInstanceEntity);
+    ViewSubResourceService service = new ViewSubResourceService(type, viewInstanceEntity);
 
     ResultSerializer serializer = service.getResultSerializer(MediaType.TEXT_PLAIN_TYPE);
 
@@ -191,7 +190,7 @@ public class ViewSubResourceServiceTest extends BaseServiceTest {
     Resource.Type type = new Resource.Type("subResource");
 
     // get resource
-    ViewSubResourceService service = new ViewSubResourceService(ApiVersion.Default, type, viewInstanceEntity);
+    ViewSubResourceService service = new ViewSubResourceService(type, viewInstanceEntity);
 
     ResultSerializer serializer = service.getResultSerializer(MediaType.APPLICATION_JSON_TYPE);
 
@@ -220,7 +219,7 @@ public class ViewSubResourceServiceTest extends BaseServiceTest {
      * Construct a view sub-resource service.
      */
     public TestViewSubResourceService(Resource.Type type, ViewInstanceEntity viewInstanceDefinition) {
-      super(ApiVersion.Default, type, viewInstanceDefinition);
+      super(type, viewInstanceDefinition);
     }
 
     public Response getSubResource1(@Context HttpHeaders headers, @Context UriInfo ui,

http://git-wip-us.apache.org/repos/asf/ambari/blob/bf0bb2ea/ambari-server/src/test/java/org/apache/ambari/server/api/services/WorkflowServiceTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/api/services/WorkflowServiceTest.java b/ambari-server/src/test/java/org/apache/ambari/server/api/services/WorkflowServiceTest.java
index 250812f..b9cc545 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/api/services/WorkflowServiceTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/api/services/WorkflowServiceTest.java
@@ -28,7 +28,6 @@ import javax.ws.rs.core.UriInfo;
 import org.apache.ambari.server.api.resources.ResourceInstance;
 import org.apache.ambari.server.api.services.parsers.RequestBodyParser;
 import org.apache.ambari.server.api.services.serializers.ResultSerializer;
-import org.apache.ambari.server.api.util.ApiVersion;
 
 /**
  * Unit tests for WorkflowService.
@@ -62,7 +61,7 @@ public class WorkflowServiceTest extends BaseServiceTest {
     private String clusterName;
 
     public TestWorkflowService(String clusterName) {
-      super(ApiVersion.Default, clusterName);
+      super(clusterName);
       this.clusterName = clusterName;
     }
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/bf0bb2ea/ambari-server/src/test/java/org/apache/ambari/server/api/services/stackadvisor/commands/ConfigurationRecommendationCommandTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/api/services/stackadvisor/commands/ConfigurationRecommendationCommandTest.java b/ambari-server/src/test/java/org/apache/ambari/server/api/services/stackadvisor/commands/ConfigurationRecommendationCommandTest.java
index a63f011..8f608aa 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/api/services/stackadvisor/commands/ConfigurationRecommendationCommandTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/api/services/stackadvisor/commands/ConfigurationRecommendationCommandTest.java
@@ -34,7 +34,6 @@ import org.apache.ambari.server.api.services.AmbariMetaInfo;
 import org.apache.ambari.server.api.services.stackadvisor.StackAdvisorRequest;
 import org.apache.ambari.server.api.services.stackadvisor.StackAdvisorRunner;
 import org.apache.ambari.server.api.services.stackadvisor.recommendations.RecommendationResponse;
-import org.apache.ambari.server.api.util.ApiVersion;
 import org.junit.Test;
 
 public class ConfigurationRecommendationCommandTest {
@@ -44,7 +43,7 @@ public class ConfigurationRecommendationCommandTest {
     StackAdvisorRunner saRunner = mock(StackAdvisorRunner.class);
     File file = mock(File.class);
     AmbariMetaInfo metaInfo = mock(AmbariMetaInfo.class);
-    ConfigurationRecommendationCommand command = new ConfigurationRecommendationCommand(ApiVersion.Default, file, "1w", "script", 1, saRunner, metaInfo);
+    ConfigurationRecommendationCommand command = new ConfigurationRecommendationCommand(file, "1w", "script", 1, saRunner, metaInfo);
 
     StackAdvisorRequest request = mock(StackAdvisorRequest.class);
     Map<String, Set<String>> componentHostGroupMap = new HashMap<>();

http://git-wip-us.apache.org/repos/asf/ambari/blob/bf0bb2ea/ambari-server/src/test/java/org/apache/ambari/server/api/services/stackadvisor/commands/StackAdvisorCommandTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/api/services/stackadvisor/commands/StackAdvisorCommandTest.java b/ambari-server/src/test/java/org/apache/ambari/server/api/services/stackadvisor/commands/StackAdvisorCommandTest.java
index 81c36b3..67048ad 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/api/services/stackadvisor/commands/StackAdvisorCommandTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/api/services/stackadvisor/commands/StackAdvisorCommandTest.java
@@ -46,7 +46,6 @@ import org.apache.ambari.server.api.services.stackadvisor.StackAdvisorRequestExc
 import org.apache.ambari.server.api.services.stackadvisor.StackAdvisorResponse;
 import org.apache.ambari.server.api.services.stackadvisor.StackAdvisorRunner;
 import org.apache.ambari.server.api.services.stackadvisor.commands.StackAdvisorCommand.StackAdvisorData;
-import org.apache.ambari.server.api.util.ApiVersion;
 import org.apache.commons.io.FileUtils;
 import org.codehaus.jackson.JsonNode;
 import org.codehaus.jackson.annotate.JsonProperty;
@@ -268,7 +267,7 @@ public class StackAdvisorCommandTest {
   class TestStackAdvisorCommand extends StackAdvisorCommand<TestResource> {
     public TestStackAdvisorCommand(File recommendationsDir, String recommendationsArtifactsLifetime, String stackAdvisorScript,
         int requestId, StackAdvisorRunner saRunner, AmbariMetaInfo metaInfo) {
-      super(ApiVersion.Default, recommendationsDir, recommendationsArtifactsLifetime, stackAdvisorScript, requestId, saRunner, metaInfo);
+      super(recommendationsDir, recommendationsArtifactsLifetime, stackAdvisorScript, requestId, saRunner, metaInfo);
     }
 
     @Override


Mime
View raw message