]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-7825 rename ProcessSystemInfoClient CeHttpClient
authorSébastien Lesaint <sebastien.lesaint@sonarsource.com>
Fri, 19 Aug 2016 16:57:53 +0000 (18:57 +0200)
committerSébastien Lesaint <sebastien.lesaint@sonarsource.com>
Tue, 23 Aug 2016 13:14:18 +0000 (15:14 +0200)
server/sonar-server/src/main/java/org/sonar/ce/CeModule.java
server/sonar-server/src/main/java/org/sonar/ce/http/CeHttpClient.java [new file with mode: 0644]
server/sonar-server/src/main/java/org/sonar/ce/http/package-info.java [new file with mode: 0644]
server/sonar-server/src/main/java/org/sonar/server/platform/monitoring/ProcessSystemInfoClient.java [deleted file]
server/sonar-server/src/main/java/org/sonar/server/platform/platformlevel/PlatformLevel4.java
server/sonar-server/src/main/java/org/sonar/server/platform/ws/InfoAction.java
server/sonar-server/src/test/java/org/sonar/ce/http/CeHttpClientTest.java [new file with mode: 0644]
server/sonar-server/src/test/java/org/sonar/server/platform/monitoring/ProcessSystemInfoClientTest.java [deleted file]
server/sonar-server/src/test/java/org/sonar/server/platform/ws/InfoActionTest.java
server/sonar-server/src/test/java/org/sonar/server/platform/ws/SystemWsTest.java

index 09b13d7434c1c026dc76b254cef62f063e6cd65d..ad632590e50415d00e2f2f3e224822f78149a382 100644 (file)
@@ -19,6 +19,7 @@
  */
 package org.sonar.ce;
 
+import org.sonar.ce.http.CeHttpClient;
 import org.sonar.ce.log.CeLogging;
 import org.sonar.ce.queue.CeQueueImpl;
 import org.sonar.ce.taskprocessor.ReportTaskProcessorDeclaration;
@@ -29,11 +30,12 @@ public class CeModule extends Module {
   @Override
   protected void configureModule() {
     add(CeLogging.class,
+      CeHttpClient.class,
 
       // Queue
       CeQueueImpl.class,
       ReportSubmitter.class,
-      
+
       // Core tasks processors
       ReportTaskProcessorDeclaration.class);
   }
diff --git a/server/sonar-server/src/main/java/org/sonar/ce/http/CeHttpClient.java b/server/sonar-server/src/main/java/org/sonar/ce/http/CeHttpClient.java
new file mode 100644 (file)
index 0000000..026dd8e
--- /dev/null
@@ -0,0 +1,61 @@
+/*
+ * SonarQube
+ * Copyright (C) 2009-2016 SonarSource SA
+ * mailto:contact AT sonarsource DOT com
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 3 of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ */
+package org.sonar.ce.http;
+
+import java.io.File;
+import java.net.URI;
+import java.util.Optional;
+import org.apache.commons.io.IOUtils;
+import org.sonar.api.config.Settings;
+import org.sonar.process.DefaultProcessCommands;
+import org.sonar.process.systeminfo.protobuf.ProtobufSystemInfo;
+
+import static org.sonar.process.ProcessEntryPoint.PROPERTY_SHARED_PATH;
+import static org.sonar.process.ProcessId.COMPUTE_ENGINE;
+
+/**
+ * Client for the HTTP server of the Compute Engine.
+ */
+public class CeHttpClient {
+
+  private final File ipcSharedDir;
+
+  public CeHttpClient(Settings props) {
+    this.ipcSharedDir = new File(props.getString(PROPERTY_SHARED_PATH));
+  }
+
+  /**
+   * Connects to the specified JVM process and requests system information.
+   * @return the system info, or absent if the process is not up or if its HTTP URL
+   * is not registered into IPC.
+   */
+  public Optional<ProtobufSystemInfo.SystemInfo> retrieveSystemInfo() {
+    try (DefaultProcessCommands commands = DefaultProcessCommands.secondary(ipcSharedDir, COMPUTE_ENGINE.getIpcIndex())) {
+      if (commands.isUp()) {
+        String url = commands.getHttpUrl() + "/systemInfo";
+        byte[] protobuf = IOUtils.toByteArray(new URI(url));
+        return Optional.of(ProtobufSystemInfo.SystemInfo.parseFrom(protobuf));
+      }
+      return Optional.empty();
+    } catch (Exception e) {
+      throw new IllegalStateException("Can not get system info of process " + COMPUTE_ENGINE, e);
+    }
+  }
+}
diff --git a/server/sonar-server/src/main/java/org/sonar/ce/http/package-info.java b/server/sonar-server/src/main/java/org/sonar/ce/http/package-info.java
new file mode 100644 (file)
index 0000000..0392bfe
--- /dev/null
@@ -0,0 +1,23 @@
+/*
+ * SonarQube
+ * Copyright (C) 2009-2016 SonarSource SA
+ * mailto:contact AT sonarsource DOT com
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 3 of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ */
+@ParametersAreNonnullByDefault
+package org.sonar.ce.http;
+
+import javax.annotation.ParametersAreNonnullByDefault;
diff --git a/server/sonar-server/src/main/java/org/sonar/server/platform/monitoring/ProcessSystemInfoClient.java b/server/sonar-server/src/main/java/org/sonar/server/platform/monitoring/ProcessSystemInfoClient.java
deleted file mode 100644 (file)
index ce919b9..0000000
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
- * SonarQube
- * Copyright (C) 2009-2016 SonarSource SA
- * mailto:contact AT sonarsource DOT com
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 3 of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
- */
-package org.sonar.server.platform.monitoring;
-
-import com.google.common.base.Optional;
-import java.io.File;
-import java.net.URI;
-import org.apache.commons.io.IOUtils;
-import org.sonar.api.config.Settings;
-import org.sonar.process.DefaultProcessCommands;
-import org.sonar.process.ProcessId;
-import org.sonar.process.systeminfo.protobuf.ProtobufSystemInfo;
-
-import static org.sonar.process.ProcessEntryPoint.PROPERTY_SHARED_PATH;
-
-/**
- * Connects to the System Info HTTP server of another JVM process.
- */
-public class ProcessSystemInfoClient {
-
-  private final File ipcSharedDir;
-
-  public ProcessSystemInfoClient(Settings props) {
-    this.ipcSharedDir = new File(props.getString(PROPERTY_SHARED_PATH));
-  }
-
-  /**
-   * Connects to the specified JVM process and requests system information.
-   * @return the system info, or absent if the process is not up or if its HTTP URL
-   * is not registered into IPC.
-   */
-  public Optional<ProtobufSystemInfo.SystemInfo> connect(ProcessId processId) {
-    try (DefaultProcessCommands commands = DefaultProcessCommands.secondary(ipcSharedDir, processId.getIpcIndex())) {
-      if (commands.isUp()) {
-        String url = commands.getHttpUrl() + "/systemInfo";
-        byte[] protobuf = IOUtils.toByteArray(new URI(url));
-        return Optional.of(ProtobufSystemInfo.SystemInfo.parseFrom(protobuf));
-      }
-      return Optional.absent();
-    } catch (Exception e) {
-      throw new IllegalStateException("Can not get system info of process " + processId, e);
-    }
-  }
-}
index e92fc98886def18c716d6dbb9b2fe5364a94abcc..829b1bb9fab7f72fb469a2b2ac46ed32c08d10a8 100644 (file)
@@ -145,7 +145,6 @@ import org.sonar.server.platform.monitoring.DatabaseMonitor;
 import org.sonar.server.platform.monitoring.EsMonitor;
 import org.sonar.server.platform.monitoring.JvmPropsMonitor;
 import org.sonar.server.platform.monitoring.PluginsMonitor;
-import org.sonar.server.platform.monitoring.ProcessSystemInfoClient;
 import org.sonar.server.platform.monitoring.SettingsMonitor;
 import org.sonar.server.platform.monitoring.SonarQubeMonitor;
 import org.sonar.server.platform.monitoring.SystemMonitor;
@@ -591,7 +590,6 @@ public class PlatformLevel4 extends PlatformLevel {
       ProjectLinksModule.class,
 
       // System
-      ProcessSystemInfoClient.class,
       ServerLogging.class,
       RestartAction.class,
       InfoAction.class,
index 51902513182ba2f77bb90294f29551d5466c957c..8006c68042961dc7ea50986a7dc9b416231470a1 100644 (file)
  */
 package org.sonar.server.platform.ws;
 
-import com.google.common.base.Optional;
 import java.util.Map;
+import java.util.Optional;
 import org.sonar.api.server.ws.Request;
 import org.sonar.api.server.ws.Response;
 import org.sonar.api.server.ws.WebService;
 import org.sonar.api.utils.text.JsonWriter;
+import org.sonar.ce.http.CeHttpClient;
 import org.sonar.core.permission.GlobalPermissions;
-import org.sonar.process.ProcessId;
 import org.sonar.process.systeminfo.protobuf.ProtobufSystemInfo;
 import org.sonar.server.platform.monitoring.Monitor;
-import org.sonar.server.platform.monitoring.ProcessSystemInfoClient;
 import org.sonar.server.user.UserSession;
 
 /**
@@ -38,12 +37,12 @@ import org.sonar.server.user.UserSession;
 public class InfoAction implements SystemWsAction {
 
   private final UserSession userSession;
-  private final ProcessSystemInfoClient processSystemInfoClient;
+  private final CeHttpClient ceHttpClient;
   private final Monitor[] monitors;
 
-  public InfoAction(UserSession userSession, ProcessSystemInfoClient processSystemInfoClient, Monitor... monitors) {
+  public InfoAction(UserSession userSession, CeHttpClient ceHttpClient, Monitor... monitors) {
     this.userSession = userSession;
-    this.processSystemInfoClient = processSystemInfoClient;
+    this.ceHttpClient = ceHttpClient;
     this.monitors = monitors;
   }
 
@@ -78,7 +77,7 @@ public class InfoAction implements SystemWsAction {
       }
       json.endObject();
     }
-    Optional<ProtobufSystemInfo.SystemInfo> ceSysInfo = processSystemInfoClient.connect(ProcessId.COMPUTE_ENGINE);
+    Optional<ProtobufSystemInfo.SystemInfo> ceSysInfo = ceHttpClient.retrieveSystemInfo();
     if (ceSysInfo.isPresent()) {
       for (ProtobufSystemInfo.Section section : ceSysInfo.get().getSectionsList()) {
         json.name(section.getName());
diff --git a/server/sonar-server/src/test/java/org/sonar/ce/http/CeHttpClientTest.java b/server/sonar-server/src/test/java/org/sonar/ce/http/CeHttpClientTest.java
new file mode 100644 (file)
index 0000000..8a27591
--- /dev/null
@@ -0,0 +1,97 @@
+/*
+ * SonarQube
+ * Copyright (C) 2009-2016 SonarSource SA
+ * mailto:contact AT sonarsource DOT com
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 3 of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ */
+package org.sonar.ce.http;
+
+import java.io.File;
+import java.util.Optional;
+import okhttp3.mockwebserver.MockResponse;
+import okhttp3.mockwebserver.MockWebServer;
+import okio.Buffer;
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.rules.ExpectedException;
+import org.junit.rules.TemporaryFolder;
+import org.sonar.api.config.Settings;
+import org.sonar.process.DefaultProcessCommands;
+import org.sonar.process.ProcessEntryPoint;
+import org.sonar.process.ProcessId;
+import org.sonar.process.systeminfo.protobuf.ProtobufSystemInfo;
+
+import static java.lang.String.format;
+import static org.assertj.core.api.Assertions.assertThat;
+
+public class CeHttpClientTest {
+  @Rule
+  public TemporaryFolder temp = new TemporaryFolder();
+  @Rule
+  public ExpectedException expectedException = ExpectedException.none();
+  @Rule
+  public MockWebServer server = new MockWebServer();
+
+  private File ipcSharedDir;
+  private CeHttpClient underTest;
+
+  @Before
+  public void setUp() throws Exception {
+    ipcSharedDir = temp.newFolder();
+    Settings settings = new Settings();
+    settings.setProperty(ProcessEntryPoint.PROPERTY_SHARED_PATH, ipcSharedDir.getAbsolutePath());
+    underTest = new CeHttpClient(settings);
+  }
+
+  @Test
+  public void retrieveSystemInfo_returns_absent_if_process_is_down() throws Exception {
+    Optional<ProtobufSystemInfo.SystemInfo> info = underTest.retrieveSystemInfo();
+
+    assertThat(info.isPresent()).isFalse();
+  }
+
+  @Test
+  public void retrieveSystemInfo_get_information_if_process_is_up() throws Exception {
+    Buffer response = new Buffer();
+    response.read(ProtobufSystemInfo.Section.newBuilder().build().toByteArray());
+    server.enqueue(new MockResponse().setBody(response));
+
+    // initialize registration of process
+    try (DefaultProcessCommands processCommands = DefaultProcessCommands.secondary(ipcSharedDir, ProcessId.COMPUTE_ENGINE.getIpcIndex())) {
+      processCommands.setUp();
+      processCommands.setHttpUrl(format("http://%s:%d", server.getHostName(), server.getPort()));
+    }
+
+    Optional<ProtobufSystemInfo.SystemInfo> info = underTest.retrieveSystemInfo();
+    assertThat(info.get().getSectionsCount()).isEqualTo(0);
+  }
+
+  @Test
+  public void retrieveSystemInfo_throws_ISE_if_http_error() throws Exception {
+    server.enqueue(new MockResponse().setResponseCode(500));
+
+    // initialize registration of process
+    try (DefaultProcessCommands processCommands = DefaultProcessCommands.secondary(ipcSharedDir, ProcessId.COMPUTE_ENGINE.getIpcIndex())) {
+      processCommands.setUp();
+      processCommands.setHttpUrl(format("http://%s:%d", server.getHostName(), server.getPort()));
+    }
+
+    expectedException.expect(IllegalStateException.class);
+    expectedException.expectMessage("Can not get system info of process " + ProcessId.COMPUTE_ENGINE);
+    underTest.retrieveSystemInfo();
+  }
+}
diff --git a/server/sonar-server/src/test/java/org/sonar/server/platform/monitoring/ProcessSystemInfoClientTest.java b/server/sonar-server/src/test/java/org/sonar/server/platform/monitoring/ProcessSystemInfoClientTest.java
deleted file mode 100644 (file)
index 0facb75..0000000
+++ /dev/null
@@ -1,99 +0,0 @@
-/*
- * SonarQube
- * Copyright (C) 2009-2016 SonarSource SA
- * mailto:contact AT sonarsource DOT com
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 3 of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
- */
-package org.sonar.server.platform.monitoring;
-
-import com.google.common.base.Optional;
-import okhttp3.mockwebserver.MockResponse;
-import okhttp3.mockwebserver.MockWebServer;
-import java.io.File;
-import okio.Buffer;
-import org.junit.Before;
-import org.junit.Rule;
-import org.junit.Test;
-import org.junit.rules.ExpectedException;
-import org.junit.rules.TemporaryFolder;
-import org.sonar.api.config.Settings;
-import org.sonar.process.DefaultProcessCommands;
-import org.sonar.process.ProcessEntryPoint;
-import org.sonar.process.ProcessId;
-import org.sonar.process.systeminfo.protobuf.ProtobufSystemInfo;
-
-import static java.lang.String.format;
-import static org.assertj.core.api.Assertions.assertThat;
-
-public class ProcessSystemInfoClientTest {
-  @Rule
-  public TemporaryFolder temp = new TemporaryFolder();
-
-  @Rule
-  public ExpectedException expectedException = ExpectedException.none();
-
-  @Rule
-  public MockWebServer server = new MockWebServer();
-
-  File ipcSharedDir;
-  ProcessSystemInfoClient underTest;
-
-  @Before
-  public void setUp() throws Exception {
-    ipcSharedDir = temp.newFolder();
-    Settings settings = new Settings();
-    settings.setProperty(ProcessEntryPoint.PROPERTY_SHARED_PATH, ipcSharedDir.getAbsolutePath());
-    underTest = new ProcessSystemInfoClient(settings);
-  }
-
-  @Test
-  public void connect_returns_absent_if_process_is_down() throws Exception {
-    Optional<ProtobufSystemInfo.SystemInfo> info = underTest.connect(ProcessId.COMPUTE_ENGINE);
-
-    assertThat(info.isPresent()).isFalse();
-  }
-
-  @Test
-  public void get_information_if_process_is_up() throws Exception {
-    Buffer response = new Buffer();
-    response.read(ProtobufSystemInfo.Section.newBuilder().build().toByteArray());
-    server.enqueue(new MockResponse().setBody(response));
-
-    // initialize registration of process
-    try (DefaultProcessCommands processCommands = DefaultProcessCommands.secondary(ipcSharedDir, ProcessId.COMPUTE_ENGINE.getIpcIndex())) {
-      processCommands.setUp();
-      processCommands.setHttpUrl(format("http://%s:%d", server.getHostName(), server.getPort()));
-    }
-
-    Optional<ProtobufSystemInfo.SystemInfo> info = underTest.connect(ProcessId.COMPUTE_ENGINE);
-    assertThat(info.get().getSectionsCount()).isEqualTo(0);
-  }
-
-  @Test
-  public void throws_ISE_if_http_error() throws Exception {
-    server.enqueue(new MockResponse().setResponseCode(500));
-
-    // initialize registration of process
-    try (DefaultProcessCommands processCommands = DefaultProcessCommands.secondary(ipcSharedDir, ProcessId.COMPUTE_ENGINE.getIpcIndex())) {
-      processCommands.setUp();
-      processCommands.setHttpUrl(format("http://%s:%d", server.getHostName(), server.getPort()));
-    }
-
-    expectedException.expect(IllegalStateException.class);
-    expectedException.expectMessage("Can not get system info of process " + ProcessId.COMPUTE_ENGINE);
-    underTest.connect(ProcessId.COMPUTE_ENGINE);
-  }
-}
index 6744c4b75689d23559f271e7a9a85c9ed9172736..af70d848614a7fbd2b47323aab1391a8237315a3 100644 (file)
@@ -21,13 +21,14 @@ package org.sonar.server.platform.ws;
 
 import java.util.LinkedHashMap;
 import java.util.Map;
+import java.util.Optional;
 import org.junit.Rule;
 import org.junit.Test;
 import org.mockito.Mockito;
 import org.sonar.core.permission.GlobalPermissions;
 import org.sonar.server.exceptions.ForbiddenException;
 import org.sonar.server.platform.monitoring.Monitor;
-import org.sonar.server.platform.monitoring.ProcessSystemInfoClient;
+import org.sonar.ce.http.CeHttpClient;
 import org.sonar.server.tester.UserSessionRule;
 import org.sonar.server.ws.TestResponse;
 import org.sonar.server.ws.WsActionTester;
@@ -43,9 +44,9 @@ public class InfoActionTest {
 
   Monitor monitor1 = mock(Monitor.class);
   Monitor monitor2 = mock(Monitor.class);
-  ProcessSystemInfoClient processSystemInfoClient = mock(ProcessSystemInfoClient.class, Mockito.RETURNS_MOCKS);
+  CeHttpClient ceHttpClient = mock(CeHttpClient.class, Mockito.RETURNS_MOCKS);
 
-  WsActionTester ws = new WsActionTester(new InfoAction(userSessionRule, processSystemInfoClient, monitor1, monitor2));
+  WsActionTester ws = new WsActionTester(new InfoAction(userSessionRule, ceHttpClient, monitor1, monitor2));
 
   @Test
   public void test_definition() throws Exception {
@@ -75,6 +76,7 @@ public class InfoActionTest {
     when(monitor1.attributes()).thenReturn(attributes1);
     when(monitor2.name()).thenReturn("Monitor Two");
     when(monitor2.attributes()).thenReturn(attributes2);
+    when(ceHttpClient.retrieveSystemInfo()).thenReturn(Optional.empty());
 
     TestResponse response = ws.newRequest().execute();
     // response does not contain empty "Monitor Three"
index 112df0694a3ca2767a4652e397363b84a58f527d..6b754958e72ec3683433cfc57bdc45a385342af4 100644 (file)
@@ -25,7 +25,7 @@ import org.sonar.api.server.ws.WebService;
 import org.sonar.server.app.ProcessCommandWrapper;
 import org.sonar.server.app.RestartFlagHolder;
 import org.sonar.server.platform.Platform;
-import org.sonar.server.platform.monitoring.ProcessSystemInfoClient;
+import org.sonar.ce.http.CeHttpClient;
 import org.sonar.server.tester.AnonymousMockUserSession;
 import org.sonar.server.user.UserSession;
 
@@ -34,12 +34,12 @@ import static org.mockito.Mockito.mock;
 
 public class SystemWsTest {
 
-  ProcessSystemInfoClient processSystemInfoClient = mock(ProcessSystemInfoClient.class);
+  CeHttpClient ceHttpClient = mock(CeHttpClient.class);
 
   @Test
   public void define() {
     RestartAction action1 = new RestartAction(mock(UserSession.class), mock(Settings.class), mock(Platform.class), mock(ProcessCommandWrapper.class), mock(RestartFlagHolder.class));
-    InfoAction action2 = new InfoAction(new AnonymousMockUserSession(), processSystemInfoClient);
+    InfoAction action2 = new InfoAction(new AnonymousMockUserSession(), ceHttpClient);
     SystemWs ws = new SystemWs(action1, action2);
     WebService.Context context = new WebService.Context();