public static void checkResourceAndConnectivity(
     ApplicationController applicationController,
     MicroServiceRepoManager microServiceRepoManager,
     String handleID,
     Map<String, Boolean> orderedList)
     throws FioranoException {
   for (String app_version : orderedList.keySet()) {
     String[] current_AppGUIDAndVersion = ApplicationUtil.returnAppGUIDAndVersion(app_version);
     String currentGUID = current_AppGUIDAndVersion[0];
     Float currentVersion = Float.valueOf(current_AppGUIDAndVersion[1]);
     Application currentApplication =
         applicationController.getSavedApplication(currentGUID, currentVersion);
     if (!applicationController.isApplicationRunning(currentGUID, currentVersion, handleID)) {
       for (ServiceInstance si : currentApplication.getServiceInstances()) {
         validateServicesBeforeLaunch(currentApplication, microServiceRepoManager, si);
       }
     }
   }
 }
 private static void checkUniquenessOfDebugPorts(ServiceInstance instance, Application application)
     throws FioranoException {
   for (ServiceInstance localInstance : application.getServiceInstances()) {
     //  If it's the same instance then continue.
     if (localInstance.getName().equalsIgnoreCase(instance.getName())) continue;
     //  If this instance doesn't have debugging ON then the port number doesn't matter.
     if (!localInstance.isDebugMode()) continue;
     int localPort = localInstance.getDebugPort();
     int globalPort = instance.getDebugPort();
     if (localPort == globalPort) {
       throw new FioranoException(
           I18NUtil.getMessage(
               Bundle.class,
               Bundle.ERROR_SERVICE_DEBUG_PORT_INUSE,
               instance.getName(),
               String.valueOf(globalPort),
               localInstance.getName()));
     }
   }
 }