Initial unit testing for marathon binding.
authorDavid Bosschaert <davidb@apache.org>
Thu, 15 Jun 2017 09:39:05 +0000 (10:39 +0100)
committerDavid Bosschaert <davidb@apache.org>
Thu, 15 Jun 2017 09:39:05 +0000 (10:39 +0100)
containers-marathon/src/main/java/org/apache/aries/containers/marathon/impl/MarathonServiceManager.java

index fa3998b..d2e0e55 100644 (file)
@@ -40,17 +40,21 @@ import mesosphere.marathon.client.model.v2.GetAppsResponse;
 import mesosphere.marathon.client.model.v2.Port;
 
 public class MarathonServiceManager implements ServiceManager {
-    private static final String SERVICE_NAME = "org.apache.aries.containers.service.name";
+    static final String SERVICE_NAME = "org.apache.aries.containers.service.name";
 
     private final Marathon marathonClient;
 
+    MarathonServiceManager(Marathon mc) {
+        marathonClient = mc;
+    }
+
     /**
      * Create the Marathon Service Manager.
      *
      * @param marathonURL The Marathon URL
      */
     public MarathonServiceManager(String marathonURL) {
-        marathonClient = MarathonClient.getInstance(marathonURL);
+        this(MarathonClient.getInstance(marathonURL));
     }
 
     /**