ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mpapirkovs...@apache.org
Subject [1/2] AMBARI-6380. Provide API support for sending POST request with special header that will be treated as GET (mpapirkovskyy)
Date Fri, 04 Jul 2014 13:32:39 GMT
Repository: ambari
Updated Branches:
  refs/heads/branch-1.6.1 cb93e874d -> 53ed26e44


http://git-wip-us.apache.org/repos/asf/ambari/blob/53ed26e4/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 bd9866f..b9e2fb6 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
@@ -42,14 +42,14 @@ public class HostComponentServiceTest extends BaseServiceTest {
 
     //getHostComponent
     HostComponentService componentService = new TestHostComponentService("clusterName", "serviceName",
"componentName");
-    Method m = componentService.getClass().getMethod("getHostComponent", HttpHeaders.class,
UriInfo.class, String.class);
-    Object[] args = new Object[] {getHttpHeaders(), getUriInfo(), "componentName"};
+    Method m = componentService.getClass().getMethod("getHostComponent", String.class, HttpHeaders.class,
UriInfo.class, String.class);
+    Object[] args = new Object[] {null, getHttpHeaders(), getUriInfo(), "componentName"};
     listInvocations.add(new ServiceTestInvocation(Request.Type.GET, componentService, m,
args, null));
 
     //getHostComponents
     componentService = new TestHostComponentService("clusterName", "serviceName", null);
-    m = componentService.getClass().getMethod("getHostComponents", HttpHeaders.class, UriInfo.class);
-    args = new Object[] {getHttpHeaders(), getUriInfo()};
+    m = componentService.getClass().getMethod("getHostComponents", String.class, HttpHeaders.class,
UriInfo.class);
+    args = new Object[] {null, getHttpHeaders(), getUriInfo()};
     listInvocations.add(new ServiceTestInvocation(Request.Type.GET, componentService, m,
args, null));
 
     //createHostComponent

http://git-wip-us.apache.org/repos/asf/ambari/blob/53ed26e4/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 a148323..b66ad9d 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
@@ -42,14 +42,14 @@ public class HostServiceTest extends BaseServiceTest {
 
     //getHost
     HostService service = new TestHostService("clusterName", "hostName");
-    Method m = service.getClass().getMethod("getHost", HttpHeaders.class, UriInfo.class,
String.class);
-    Object[] args = new Object[] {getHttpHeaders(), getUriInfo(), "hostName"};
+    Method m = service.getClass().getMethod("getHost", String.class, HttpHeaders.class, UriInfo.class,
String.class);
+    Object[] args = new Object[] {null, getHttpHeaders(), getUriInfo(), "hostName"};
     listInvocations.add(new ServiceTestInvocation(Request.Type.GET, service, m, args, null));
 
     //getHosts
     service = new TestHostService("clusterName", null);
-    m = service.getClass().getMethod("getHosts", HttpHeaders.class, UriInfo.class);
-    args = new Object[] {getHttpHeaders(), getUriInfo()};
+    m = service.getClass().getMethod("getHosts", String.class, HttpHeaders.class, UriInfo.class);
+    args = new Object[] {null, getHttpHeaders(), getUriInfo()};
     listInvocations.add(new ServiceTestInvocation(Request.Type.GET, service, m, args, null));
 
     //createHost

http://git-wip-us.apache.org/repos/asf/ambari/blob/53ed26e4/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 047c75d..cb4e5f8 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
@@ -42,14 +42,14 @@ public class InstanceServiceTest extends BaseServiceTest {
 
     //getInstance
     InstanceService service = new TestInstanceService("clusterName", "instanceName");
-    Method m = service.getClass().getMethod("getInstance", HttpHeaders.class, UriInfo.class,
String.class);
-    Object[] args = new Object[] {getHttpHeaders(), getUriInfo(), "instanceName"};
+    Method m = service.getClass().getMethod("getInstance", String.class, HttpHeaders.class,
UriInfo.class, String.class);
+    Object[] args = new Object[] {null, getHttpHeaders(), getUriInfo(), "instanceName"};
     listInvocations.add(new ServiceTestInvocation(Request.Type.GET, service, m, args, null));
 
     //getInstances
     service = new TestInstanceService("clusterName", null);
-    m = service.getClass().getMethod("getInstances", HttpHeaders.class, UriInfo.class);
-    args = new Object[] {getHttpHeaders(), getUriInfo()};
+    m = service.getClass().getMethod("getInstances", String.class, HttpHeaders.class, UriInfo.class);
+    args = new Object[] {null, getHttpHeaders(), getUriInfo()};
     listInvocations.add(new ServiceTestInvocation(Request.Type.GET, service, m, args, null));
 
     //createInstance

http://git-wip-us.apache.org/repos/asf/ambari/blob/53ed26e4/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 c33dd76..6e0fa96 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
@@ -40,17 +40,17 @@ public class JobServiceTest extends BaseServiceTest {
 
     // getJob
     JobService service = new TestJobService("clusterName", "jobId");
-    Method m = service.getClass().getMethod("getJob", HttpHeaders.class,
+    Method m = service.getClass().getMethod("getJob", String.class, HttpHeaders.class,
         UriInfo.class, String.class);
-    Object[] args = new Object[] {getHttpHeaders(), getUriInfo(), "jobId"};
+    Object[] args = new Object[] {null, getHttpHeaders(), getUriInfo(), "jobId"};
     listInvocations.add(new ServiceTestInvocation(Request.Type.GET, service, m,
         args, null));
 
     // getJobs
     service = new TestJobService("clusterName", null);
-    m = service.getClass().getMethod("getJobs", HttpHeaders.class,
+    m = service.getClass().getMethod("getJobs", String.class, HttpHeaders.class,
         UriInfo.class);
-    args = new Object[] {getHttpHeaders(), getUriInfo()};
+    args = new Object[] {null, getHttpHeaders(), getUriInfo()};
     listInvocations.add(new ServiceTestInvocation(Request.Type.GET, service, m,
         args, null));
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/53ed26e4/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 b2306b4..310d69f 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
@@ -42,44 +42,44 @@ public class RootServiceServiceTest extends BaseServiceTest {
     
     //getServices
     RootServiceService service = new TestRootServiceService(null, null, null);
-    Method m = service.getClass().getMethod("getServices", HttpHeaders.class, UriInfo.class);
-    Object[] args = new Object[] {getHttpHeaders(), getUriInfo()};
+    Method m = service.getClass().getMethod("getServices", String.class, HttpHeaders.class,
UriInfo.class);
+    Object[] args = new Object[] {null, getHttpHeaders(), getUriInfo()};
     listInvocations.add(new ServiceTestInvocation(Request.Type.GET, service, m, args, null));
     
     //getService
     service = new TestRootServiceService("AMBARI", null, null);
-    m = service.getClass().getMethod("getService", HttpHeaders.class, UriInfo.class, String.class);
-    args = new Object[] {getHttpHeaders(), getUriInfo(), "AMBARI"};
+    m = service.getClass().getMethod("getService", String.class, HttpHeaders.class, UriInfo.class,
String.class);
+    args = new Object[] {null, getHttpHeaders(), getUriInfo(), "AMBARI"};
     listInvocations.add(new ServiceTestInvocation(Request.Type.GET, service, m, args, null));
     
     //getServiceComponents
     service = new TestRootServiceService("AMBARI", null, null);
-    m = service.getClass().getMethod("getServiceComponents", HttpHeaders.class, UriInfo.class,
String.class);
-    args = new Object[] {getHttpHeaders(), getUriInfo(), "AMBARI"};
+    m = service.getClass().getMethod("getServiceComponents", String.class, HttpHeaders.class,
UriInfo.class, String.class);
+    args = new Object[] {null, getHttpHeaders(), getUriInfo(), "AMBARI"};
     listInvocations.add(new ServiceTestInvocation(Request.Type.GET, service, m, args, null));
     
     //getServiceComponent
     service = new TestRootServiceService("AMBARI", "AMBARI_SERVER", null);
-    m = service.getClass().getMethod("getServiceComponent", HttpHeaders.class, UriInfo.class,
String.class, String.class);
-    args = new Object[] {getHttpHeaders(), getUriInfo(), "AMBARI", "AMBARI_SERVER"};
+    m = service.getClass().getMethod("getServiceComponent", String.class, HttpHeaders.class,
UriInfo.class, String.class, String.class);
+    args = new Object[] {null, getHttpHeaders(), getUriInfo(), "AMBARI", "AMBARI_SERVER"};
     listInvocations.add(new ServiceTestInvocation(Request.Type.GET, service, m, args, null));
     
     //getRootHostComponents
     service = new TestRootServiceService("AMBARI", "AMBARI_SERVER", null);
-    m = service.getClass().getMethod("getRootHostComponents", HttpHeaders.class, UriInfo.class,
String.class, String.class);
-    args = new Object[] {getHttpHeaders(), getUriInfo(), "AMBARI", "AMBARI_SERVER"};
+    m = service.getClass().getMethod("getRootHostComponents", String.class, HttpHeaders.class,
UriInfo.class, String.class, String.class);
+    args = new Object[] {null, getHttpHeaders(), getUriInfo(), "AMBARI", "AMBARI_SERVER"};
     listInvocations.add(new ServiceTestInvocation(Request.Type.GET, service, m, args, null));
     
     //getRootHosts
     service = new TestRootServiceService("AMBARI", "AMBARI_SERVER", null);
-    m = service.getClass().getMethod("getRootHosts", HttpHeaders.class, UriInfo.class);
-    args = new Object[] {getHttpHeaders(), getUriInfo()};
+    m = service.getClass().getMethod("getRootHosts", String.class, HttpHeaders.class, UriInfo.class);
+    args = new Object[] {null, getHttpHeaders(), getUriInfo()};
     listInvocations.add(new ServiceTestInvocation(Request.Type.GET, service, m, args, null));
     
     //getRootHost
     service = new TestRootServiceService("AMBARI", "AMBARI_SERVER", "host1");
-    m = service.getClass().getMethod("getRootHost", HttpHeaders.class, UriInfo.class, String.class);
-    args = new Object[] {getHttpHeaders(), getUriInfo(), "host1"};
+    m = service.getClass().getMethod("getRootHost", String.class, HttpHeaders.class, UriInfo.class,
String.class);
+    args = new Object[] {null, getHttpHeaders(), getUriInfo(), "host1"};
     listInvocations.add(new ServiceTestInvocation(Request.Type.GET, service, m, args, null));
     
     

http://git-wip-us.apache.org/repos/asf/ambari/blob/53ed26e4/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 ec92b4e..5ca3fb3 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
@@ -41,14 +41,14 @@ public class ServiceServiceTest extends BaseServiceTest {
 
     //getService
     ServiceService service = new TestServiceService("clusterName", "serviceName");
-    Method m = service.getClass().getMethod("getService", HttpHeaders.class, UriInfo.class,
String.class);
-    Object[] args = new Object[] {getHttpHeaders(), getUriInfo(), "serviceName"};
+    Method m = service.getClass().getMethod("getService", String.class, HttpHeaders.class,
UriInfo.class, String.class);
+    Object[] args = new Object[] {null, getHttpHeaders(), getUriInfo(), "serviceName"};
     listInvocations.add(new ServiceTestInvocation(Request.Type.GET, service, m, args, null));
 
     //getServices
     service = new TestServiceService("clusterName", null);
-    m = service.getClass().getMethod("getServices", HttpHeaders.class, UriInfo.class);
-    args = new Object[] {getHttpHeaders(), getUriInfo()};
+    m = service.getClass().getMethod("getServices", String.class, HttpHeaders.class, UriInfo.class);
+    args = new Object[] {null, getHttpHeaders(), getUriInfo()};
     listInvocations.add(new ServiceTestInvocation(Request.Type.GET, service, m, args, null));
 
     //createService

http://git-wip-us.apache.org/repos/asf/ambari/blob/53ed26e4/ambari-server/src/test/java/org/apache/ambari/server/api/services/Stacks2ServiceTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/api/services/Stacks2ServiceTest.java
b/ambari-server/src/test/java/org/apache/ambari/server/api/services/Stacks2ServiceTest.java
index be08abd..51609cc 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/api/services/Stacks2ServiceTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/api/services/Stacks2ServiceTest.java
@@ -42,40 +42,40 @@ public class Stacks2ServiceTest extends BaseServiceTest {
 
     //getStack
     Stacks2Service service = new TestStacksService("stackName", null);
-    Method m = service.getClass().getMethod("getStack", HttpHeaders.class, UriInfo.class,
String.class);
-    Object[] args = new Object[] {getHttpHeaders(), getUriInfo(), "stackName"};
+    Method m = service.getClass().getMethod("getStack", String.class, HttpHeaders.class,
UriInfo.class, String.class);
+    Object[] args = new Object[] {null, getHttpHeaders(), getUriInfo(), "stackName"};
     listInvocations.add(new ServiceTestInvocation(Request.Type.GET, service, m, args, null));
 
     //getStacks
     service = new TestStacksService(null, null);
-    m = service.getClass().getMethod("getStacks", HttpHeaders.class, UriInfo.class);
-    args = new Object[] {getHttpHeaders(), getUriInfo()};
+    m = service.getClass().getMethod("getStacks", String.class, HttpHeaders.class, UriInfo.class);
+    args = new Object[] {null, getHttpHeaders(), getUriInfo()};
     listInvocations.add(new ServiceTestInvocation(Request.Type.GET, service, m, args, null));
 
     //getStackVersion
     service = new TestStacksService("stackName", "stackVersion");
-    m = service.getClass().getMethod("getStackVersion", HttpHeaders.class, UriInfo.class,
String.class, String.class);
-    args = new Object[] {getHttpHeaders(), getUriInfo(), "stackName", "stackVersion"};
+    m = service.getClass().getMethod("getStackVersion", String.class, HttpHeaders.class,
UriInfo.class, String.class, String.class);
+    args = new Object[] {null, getHttpHeaders(), getUriInfo(), "stackName", "stackVersion"};
     listInvocations.add(new ServiceTestInvocation(Request.Type.GET, service, m, args, null));
 
     //getStackVersions
     service = new TestStacksService("stackName", null);
-    m = service.getClass().getMethod("getStackVersions", HttpHeaders.class, UriInfo.class,
String.class);
-    args = new Object[] {getHttpHeaders(), getUriInfo(), "stackName"};
+    m = service.getClass().getMethod("getStackVersions", String.class, HttpHeaders.class,
UriInfo.class, String.class);
+    args = new Object[] {null, getHttpHeaders(), getUriInfo(), "stackName"};
     listInvocations.add(new ServiceTestInvocation(Request.Type.GET, service, m, args, null));
 
     // getRepository
     service = new TestStacksService("stackName", "stackVersion");
-    m = service.getClass().getMethod("getRepository", HttpHeaders.class, UriInfo.class, String.class,
+    m = service.getClass().getMethod("getRepository", String.class, HttpHeaders.class, UriInfo.class,
String.class,
         String.class, String.class, String.class);
-    args = new Object[] {getHttpHeaders(), getUriInfo(), "stackName", "stackVersion", "os",
"repo-id"};
+    args = new Object[] {null, getHttpHeaders(), getUriInfo(), "stackName", "stackVersion",
"os", "repo-id"};
     listInvocations.add(new ServiceTestInvocation(Request.Type.GET, service, m, args, null));
 
     // getRepositories
     service = new TestStacksService("stackName", "stackVersion");
-    m = service.getClass().getMethod("getRepositories", HttpHeaders.class, UriInfo.class,
String.class,
+    m = service.getClass().getMethod("getRepositories", String.class, HttpHeaders.class,
UriInfo.class, String.class,
         String.class, String.class);
-    args = new Object[] {getHttpHeaders(), getUriInfo(), "stackName", "stackVersion", "os"};
+    args = new Object[] {null, getHttpHeaders(), getUriInfo(), "stackName", "stackVersion",
"os"};
     listInvocations.add(new ServiceTestInvocation(Request.Type.GET, service, m, args, null));
 
     // updateRepository
@@ -87,57 +87,57 @@ public class Stacks2ServiceTest extends BaseServiceTest {
 
     // getStackService
     service = new TestStacksService("stackName", null);
-    m = service.getClass().getMethod("getStackService", HttpHeaders.class, UriInfo.class,
String.class,
+    m = service.getClass().getMethod("getStackService", String.class, HttpHeaders.class,
UriInfo.class, String.class,
         String.class, String.class);
-    args = new Object[] {getHttpHeaders(), getUriInfo(), "stackName", "stackVersion", "service-name"};
+    args = new Object[] {null, getHttpHeaders(), getUriInfo(), "stackName", "stackVersion",
"service-name"};
     listInvocations.add(new ServiceTestInvocation(Request.Type.GET, service, m, args, null));
 
     // getStackServices
     service = new TestStacksService("stackName", null);
-    m = service.getClass().getMethod("getStackServices", HttpHeaders.class, UriInfo.class,
String.class, String.class);
-    args = new Object[] {getHttpHeaders(), getUriInfo(), "stackName", "stackVersion"};
+    m = service.getClass().getMethod("getStackServices", String.class, HttpHeaders.class,
UriInfo.class, String.class, String.class);
+    args = new Object[] {null, getHttpHeaders(), getUriInfo(), "stackName", "stackVersion"};
     listInvocations.add(new ServiceTestInvocation(Request.Type.GET, service, m, args, null));
 
     // getStackConfiguration
     service = new TestStacksService("stackName", "stackVersion");
-    m = service.getClass().getMethod("getStackConfiguration", HttpHeaders.class, UriInfo.class,
+    m = service.getClass().getMethod("getStackConfiguration", String.class, HttpHeaders.class,
UriInfo.class,
         String.class, String.class, String.class, String.class);
-    args = new Object[] {getHttpHeaders(), getUriInfo(), "stackName", "stackVersion", "service-name",
"property-name"};
+    args = new Object[] {null, getHttpHeaders(), getUriInfo(), "stackName", "stackVersion",
"service-name", "property-name"};
     listInvocations.add(new ServiceTestInvocation(Request.Type.GET, service, m, args, null));
 
     // getStackConfigurations
     service = new TestStacksService("stackName", null);
-    m = service.getClass().getMethod("getStackConfigurations", HttpHeaders.class, UriInfo.class,
+    m = service.getClass().getMethod("getStackConfigurations", String.class, HttpHeaders.class,
UriInfo.class,
         String.class, String.class, String.class);
-    args = new Object[] {getHttpHeaders(), getUriInfo(), "stackName", "stackVersion", "service-name"};
+    args = new Object[] {null, getHttpHeaders(), getUriInfo(), "stackName", "stackVersion",
"service-name"};
     listInvocations.add(new ServiceTestInvocation(Request.Type.GET, service, m, args, null));
 
     // getServiceComponent
     service = new TestStacksService("stackName", "stackVersion");
-    m = service.getClass().getMethod("getServiceComponent", HttpHeaders.class, UriInfo.class,
+    m = service.getClass().getMethod("getServiceComponent", String.class, HttpHeaders.class,
UriInfo.class,
         String.class, String.class, String.class, String.class);
-    args = new Object[] {getHttpHeaders(), getUriInfo(), "stackName", "stackVersion", "service-name",
"component-name"};
+    args = new Object[] {null, getHttpHeaders(), getUriInfo(), "stackName", "stackVersion",
"service-name", "component-name"};
     listInvocations.add(new ServiceTestInvocation(Request.Type.GET, service, m, args, null));
 
     // getServiceComponents
     service = new TestStacksService("stackName", "stackVersion");
-    m = service.getClass().getMethod("getServiceComponents", HttpHeaders.class, UriInfo.class,
+    m = service.getClass().getMethod("getServiceComponents", String.class, HttpHeaders.class,
UriInfo.class,
         String.class, String.class, String.class);
-    args = new Object[] {getHttpHeaders(), getUriInfo(), "stackName", "stackVersion", "service-name"};
+    args = new Object[] {null, getHttpHeaders(), getUriInfo(), "stackName", "stackVersion",
"service-name"};
     listInvocations.add(new ServiceTestInvocation(Request.Type.GET, service, m, args, null));
 
     // getOperationSystem
     service = new TestStacksService("stackName", "stackVersion");
-    m = service.getClass().getMethod("getOperatingSystem", HttpHeaders.class, UriInfo.class,
+    m = service.getClass().getMethod("getOperatingSystem", String.class, HttpHeaders.class,
UriInfo.class,
         String.class, String.class, String.class);
-    args = new Object[] {getHttpHeaders(), getUriInfo(), "stackName", "stackVersion", "os-type"};
+    args = new Object[] {null, getHttpHeaders(), getUriInfo(), "stackName", "stackVersion",
"os-type"};
     listInvocations.add(new ServiceTestInvocation(Request.Type.GET, service, m, args, null));
 
     // getOperationSystems
     service = new TestStacksService("stackName", "stackVersion");
-    m = service.getClass().getMethod("getOperatingSystems", HttpHeaders.class, UriInfo.class,
+    m = service.getClass().getMethod("getOperatingSystems", String.class, HttpHeaders.class,
UriInfo.class,
         String.class, String.class);
-    args = new Object[] {getHttpHeaders(), getUriInfo(), "stackName", "stackVersion"};
+    args = new Object[] {null, getHttpHeaders(), getUriInfo(), "stackName", "stackVersion"};
     listInvocations.add(new ServiceTestInvocation(Request.Type.GET, service, m, args, null));
 
     return listInvocations;

http://git-wip-us.apache.org/repos/asf/ambari/blob/53ed26e4/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 80b7338..e36cc53 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
@@ -46,40 +46,40 @@ public class StacksServiceTest extends BaseServiceTest {
 
     // getStack
     StacksService service = new TestStacksService("stackName", null);
-    Method m = service.getClass().getMethod("getStack", HttpHeaders.class, UriInfo.class,
String.class);
-    Object[] args = new Object[] {getHttpHeaders(), getUriInfo(), "stackName"};
+    Method m = service.getClass().getMethod("getStack", String.class, HttpHeaders.class,
UriInfo.class, String.class);
+    Object[] args = new Object[] {null, getHttpHeaders(), getUriInfo(), "stackName"};
     listInvocations.add(new ServiceTestInvocation(Request.Type.GET, service, m, args, null));
 
     //getStacks
     service = new TestStacksService(null, null);
-    m = service.getClass().getMethod("getStacks", HttpHeaders.class, UriInfo.class);
-    args = new Object[] {getHttpHeaders(), getUriInfo()};
+    m = service.getClass().getMethod("getStacks", String.class, HttpHeaders.class, UriInfo.class);
+    args = new Object[] {null, getHttpHeaders(), getUriInfo()};
     listInvocations.add(new ServiceTestInvocation(Request.Type.GET, service, m, args, null));
 
     // getStackVersion
     service = new TestStacksService("stackName", "stackVersion");
-    m = service.getClass().getMethod("getStackVersion", HttpHeaders.class, UriInfo.class,
String.class, String.class);
-    args = new Object[] {getHttpHeaders(), getUriInfo(), "stackName", "stackVersion"};
+    m = service.getClass().getMethod("getStackVersion", String.class, HttpHeaders.class,
UriInfo.class, String.class, String.class);
+    args = new Object[] {null, getHttpHeaders(), getUriInfo(), "stackName", "stackVersion"};
     listInvocations.add(new ServiceTestInvocation(Request.Type.GET, service, m, args, null));
 
     // getStackVersions
     service = new TestStacksService("stackName", null);
-    m = service.getClass().getMethod("getStackVersions", HttpHeaders.class, UriInfo.class,
String.class);
-    args = new Object[] {getHttpHeaders(), getUriInfo(), "stackName"};
+    m = service.getClass().getMethod("getStackVersions", String.class, HttpHeaders.class,
UriInfo.class, String.class);
+    args = new Object[] {null, getHttpHeaders(), getUriInfo(), "stackName"};
     listInvocations.add(new ServiceTestInvocation(Request.Type.GET, service, m, args, null));
 
     // getRepository
     service = new TestStacksService("stackName", "stackVersion");
-    m = service.getClass().getMethod("getRepository", HttpHeaders.class, UriInfo.class, String.class,
+    m = service.getClass().getMethod("getRepository", String.class, HttpHeaders.class, UriInfo.class,
String.class,
         String.class, String.class, String.class);
-    args = new Object[] {getHttpHeaders(), getUriInfo(), "stackName", "stackVersion", "os",
"repo-id"};
+    args = new Object[] {null, getHttpHeaders(), getUriInfo(), "stackName", "stackVersion",
"os", "repo-id"};
     listInvocations.add(new ServiceTestInvocation(Request.Type.GET, service, m, args, null));
 
     // getRepositories
     service = new TestStacksService("stackName", "stackVersion");
-    m = service.getClass().getMethod("getRepositories", HttpHeaders.class, UriInfo.class,
String.class,
+    m = service.getClass().getMethod("getRepositories", String.class, HttpHeaders.class,
UriInfo.class, String.class,
         String.class, String.class);
-    args = new Object[] {getHttpHeaders(), getUriInfo(), "stackName", "stackVersion", "os"};
+    args = new Object[] {null, getHttpHeaders(), getUriInfo(), "stackName", "stackVersion",
"os"};
     listInvocations.add(new ServiceTestInvocation(Request.Type.GET, service, m, args, null));
 
     // updateRepository
@@ -91,57 +91,57 @@ public class StacksServiceTest extends BaseServiceTest {
 
     // getStackService
     service = new TestStacksService("stackName", null);
-    m = service.getClass().getMethod("getStackService", HttpHeaders.class, UriInfo.class,
String.class,
+    m = service.getClass().getMethod("getStackService", String.class, HttpHeaders.class,
UriInfo.class, String.class,
         String.class, String.class);
-    args = new Object[] {getHttpHeaders(), getUriInfo(), "stackName", "stackVersion", "service-name"};
+    args = new Object[] {null, getHttpHeaders(), getUriInfo(), "stackName", "stackVersion",
"service-name"};
     listInvocations.add(new ServiceTestInvocation(Request.Type.GET, service, m, args, null));
 
     // getStackServices
     service = new TestStacksService("stackName", null);
-    m = service.getClass().getMethod("getStackServices", HttpHeaders.class, UriInfo.class,
String.class, String.class);
-    args = new Object[] {getHttpHeaders(), getUriInfo(), "stackName", "stackVersion"};
+    m = service.getClass().getMethod("getStackServices", String.class, HttpHeaders.class,
UriInfo.class, String.class, String.class);
+    args = new Object[] {null, getHttpHeaders(), getUriInfo(), "stackName", "stackVersion"};
     listInvocations.add(new ServiceTestInvocation(Request.Type.GET, service, m, args, null));
 
     // getStackConfiguration
     service = new TestStacksService("stackName", "stackVersion");
-    m = service.getClass().getMethod("getStackConfiguration", HttpHeaders.class, UriInfo.class,
+    m = service.getClass().getMethod("getStackConfiguration", String.class, HttpHeaders.class,
UriInfo.class,
         String.class, String.class, String.class, String.class);
-    args = new Object[] {getHttpHeaders(), getUriInfo(), "stackName", "stackVersion", "service-name",
"property-name"};
+    args = new Object[] {null, getHttpHeaders(), getUriInfo(), "stackName", "stackVersion",
"service-name", "property-name"};
     listInvocations.add(new ServiceTestInvocation(Request.Type.GET, service, m, args, null));
 
     // getStackConfigurations
     service = new TestStacksService("stackName", null);
-    m = service.getClass().getMethod("getStackConfigurations", HttpHeaders.class, UriInfo.class,
+    m = service.getClass().getMethod("getStackConfigurations", String.class, HttpHeaders.class,
UriInfo.class,
         String.class, String.class, String.class);
-    args = new Object[] {getHttpHeaders(), getUriInfo(), "stackName", "stackVersion", "service-name"};
+    args = new Object[] {null, getHttpHeaders(), getUriInfo(), "stackName", "stackVersion",
"service-name"};
     listInvocations.add(new ServiceTestInvocation(Request.Type.GET, service, m, args, null));
 
     // getServiceComponent
     service = new TestStacksService("stackName", "stackVersion");
-    m = service.getClass().getMethod("getServiceComponent", HttpHeaders.class, UriInfo.class,
+    m = service.getClass().getMethod("getServiceComponent", String.class, HttpHeaders.class,
UriInfo.class,
         String.class, String.class, String.class, String.class);
-    args = new Object[] {getHttpHeaders(), getUriInfo(), "stackName", "stackVersion", "service-name",
"component-name"};
+    args = new Object[] {null, getHttpHeaders(), getUriInfo(), "stackName", "stackVersion",
"service-name", "component-name"};
     listInvocations.add(new ServiceTestInvocation(Request.Type.GET, service, m, args, null));
 
     // getServiceComponents
     service = new TestStacksService("stackName", "stackVersion");
-    m = service.getClass().getMethod("getServiceComponents", HttpHeaders.class, UriInfo.class,
+    m = service.getClass().getMethod("getServiceComponents", String.class, HttpHeaders.class,
UriInfo.class,
         String.class, String.class, String.class);
-    args = new Object[] {getHttpHeaders(), getUriInfo(), "stackName", "stackVersion", "service-name"};
+    args = new Object[] {null, getHttpHeaders(), getUriInfo(), "stackName", "stackVersion",
"service-name"};
     listInvocations.add(new ServiceTestInvocation(Request.Type.GET, service, m, args, null));
 
     // getOperationSystem
     service = new TestStacksService("stackName", "stackVersion");
-    m = service.getClass().getMethod("getOperatingSystem", HttpHeaders.class, UriInfo.class,
+    m = service.getClass().getMethod("getOperatingSystem", String.class, HttpHeaders.class,
UriInfo.class,
         String.class, String.class, String.class);
-    args = new Object[] {getHttpHeaders(), getUriInfo(), "stackName", "stackVersion", "os-type"};
+    args = new Object[] {null, getHttpHeaders(), getUriInfo(), "stackName", "stackVersion",
"os-type"};
     listInvocations.add(new ServiceTestInvocation(Request.Type.GET, service, m, args, null));
 
     // getOperationSystems
     service = new TestStacksService("stackName", "stackVersion");
-    m = service.getClass().getMethod("getOperatingSystems", HttpHeaders.class, UriInfo.class,
+    m = service.getClass().getMethod("getOperatingSystems", String.class, HttpHeaders.class,
UriInfo.class,
         String.class, String.class);
-    args = new Object[] {getHttpHeaders(), getUriInfo(), "stackName", "stackVersion"};
+    args = new Object[] {null, getHttpHeaders(), getUriInfo(), "stackName", "stackVersion"};
     listInvocations.add(new ServiceTestInvocation(Request.Type.GET, service, m, args, null));
 
     return listInvocations;

http://git-wip-us.apache.org/repos/asf/ambari/blob/53ed26e4/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 9a3a4b7..3394e8e 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
@@ -43,14 +43,14 @@ public class TargetClusterServiceTest extends BaseServiceTest {
 
     //getTargetCluster
     TargetClusterService targetClusterService = new TestTargetClusterService("targetClusterName");
-    Method m = targetClusterService.getClass().getMethod("getTargetCluster", HttpHeaders.class,
UriInfo.class, String.class);
-    Object[] args = new Object[] {getHttpHeaders(), getUriInfo(), "targetClusterName"};
+    Method m = targetClusterService.getClass().getMethod("getTargetCluster", String.class,
HttpHeaders.class, UriInfo.class, String.class);
+    Object[] args = new Object[] {null, getHttpHeaders(), getUriInfo(), "targetClusterName"};
     listInvocations.add(new ServiceTestInvocation(Request.Type.GET, targetClusterService,
m, args, null));
 
     //getTargetClusters
     targetClusterService = new TestTargetClusterService(null);
-    m = targetClusterService.getClass().getMethod("getTargetClusters", HttpHeaders.class,
UriInfo.class);
-    args = new Object[] {getHttpHeaders(), getUriInfo()};
+    m = targetClusterService.getClass().getMethod("getTargetClusters", String.class, HttpHeaders.class,
UriInfo.class);
+    args = new Object[] {null, getHttpHeaders(), getUriInfo()};
     listInvocations.add(new ServiceTestInvocation(Request.Type.GET, targetClusterService,
m, args, null));
 
     //createTargetCluster

http://git-wip-us.apache.org/repos/asf/ambari/blob/53ed26e4/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 f529a97..91a893a 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
@@ -42,16 +42,16 @@ public class TaskAttemptServiceTest extends BaseServiceTest {
     TestTaskAttemptService service = new TestTaskAttemptService("clusterName",
         "workflowId", "jobId");
     Method m = service.getClass().getMethod("getTaskAttempt",
-        HttpHeaders.class, UriInfo.class, String.class);
-    Object[] args = new Object[] {getHttpHeaders(), getUriInfo(), "jobId"};
+      String.class, HttpHeaders.class, UriInfo.class, String.class);
+    Object[] args = new Object[] {null, getHttpHeaders(), getUriInfo(), "jobId"};
     listInvocations.add(new ServiceTestInvocation(Request.Type.GET, service, m,
         args, null));
 
     // getTaskAttempts
     service = new TestTaskAttemptService("clusterName", "workflowId", "jobId");
-    m = service.getClass().getMethod("getTaskAttempts", HttpHeaders.class,
+    m = service.getClass().getMethod("getTaskAttempts", String.class, HttpHeaders.class,
         UriInfo.class);
-    args = new Object[] {getHttpHeaders(), getUriInfo()};
+    args = new Object[] {null, getHttpHeaders(), getUriInfo()};
     listInvocations.add(new ServiceTestInvocation(Request.Type.GET, service, m,
         args, null));
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/53ed26e4/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 2380a92..9969e59 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
@@ -40,17 +40,17 @@ public class WorkflowServiceTest extends BaseServiceTest {
 
     // getWorkflow
     WorkflowService service = new TestWorkflowService("clusterName");
-    Method m = service.getClass().getMethod("getWorkflow", HttpHeaders.class,
+    Method m = service.getClass().getMethod("getWorkflow", String.class, HttpHeaders.class,
         UriInfo.class, String.class);
-    Object[] args = new Object[] {getHttpHeaders(), getUriInfo(), "jobId"};
+    Object[] args = new Object[] {null, getHttpHeaders(), getUriInfo(), "jobId"};
     listInvocations.add(new ServiceTestInvocation(Request.Type.GET, service, m,
         args, null));
 
     // getWorkflows
     service = new TestWorkflowService("clusterName");
-    m = service.getClass().getMethod("getWorkflows", HttpHeaders.class,
+    m = service.getClass().getMethod("getWorkflows", String.class, HttpHeaders.class,
         UriInfo.class);
-    args = new Object[] {getHttpHeaders(), getUriInfo()};
+    args = new Object[] {null, getHttpHeaders(), getUriInfo()};
     listInvocations.add(new ServiceTestInvocation(Request.Type.GET, service, m,
         args, null));
 


Mime
View raw message