Revert "Corrections to getRegisteredApplications and CLI implementation"

ApplicationService is not available. For example, when using the ONOS CLI:

onos> apps -s -a
Service org.onosproject.app.ApplicationService not found

The issue seems to be a circular dependency, as ApplicationManager depends on CoreService, but CoreManager depends on ApplicationService.

Reverting for now.

This reverts commit 35ef3d3000f8b19608531dfd06f8e78482c45b32.

Change-Id: I298c3c7844df7f2395e092fbb89a8e9264883094
diff --git a/core/net/src/test/java/org/onosproject/app/impl/ApplicationManagerTest.java b/core/net/src/test/java/org/onosproject/app/impl/ApplicationManagerTest.java
index f8c7eed..5528f26 100644
--- a/core/net/src/test/java/org/onosproject/app/impl/ApplicationManagerTest.java
+++ b/core/net/src/test/java/org/onosproject/app/impl/ApplicationManagerTest.java
@@ -27,10 +27,8 @@
 import org.onosproject.common.event.impl.TestEventDispatcher;
 import org.onosproject.core.Application;
 import org.onosproject.core.ApplicationId;
-import org.onosproject.core.CoreServiceAdapter;
 import org.onosproject.core.DefaultApplication;
 import org.onosproject.core.DefaultApplicationId;
-import org.onosproject.core.Version;
 
 import java.io.InputStream;
 import java.net.URI;
@@ -51,13 +49,10 @@
 public class ApplicationManagerTest {
 
     public static final DefaultApplicationId APP_ID = new DefaultApplicationId(1, APP_NAME);
-    private static final Version CORE_VERSION = Version.version(2, 1, "0", "");
 
     private ApplicationManager mgr = new ApplicationManager();
     private ApplicationListener listener = new TestListener();
 
-
-
     private boolean deactivated = false;
 
     @Before
@@ -86,22 +81,6 @@
     }
 
     @Test
-    public void testGetRegisteredApps() {
-        mgr.coreService = new TestCoreService();
-        Set<Application> apps = mgr.getRegisteredApplications();
-        System.out.println(apps);
-        assertFalse("SET contains less Apps than it should", apps.size() < 158);
-    }
-
-    private static class TestCoreService extends CoreServiceAdapter {
-
-        @Override
-        public Version version() {
-            return CORE_VERSION;
-        }
-    }
-
-    @Test
     public void install() {
         InputStream stream = ApplicationArchive.class.getResourceAsStream("app.zip");
         Application app = mgr.install(stream);
@@ -244,4 +223,4 @@
         }
     }
 
-}
\ No newline at end of file
+}