You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@netbeans.apache.org by GitBox <gi...@apache.org> on 2017/11/30 19:23:56 UTC

[GitHub] geertjanw closed pull request #279: [NETBEANS-162] Restore autoupdate.services tests

geertjanw closed pull request #279: [NETBEANS-162] Restore autoupdate.services tests
URL: https://github.com/apache/incubator-netbeans/pull/279
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/autoupdate.services/test/unit/src/org/netbeans/api/autoupdate/RefreshItemsTest.java b/autoupdate.services/test/unit/src/org/netbeans/api/autoupdate/RefreshItemsTest.java
index 0c82cc8ff..90075761e 100644
--- a/autoupdate.services/test/unit/src/org/netbeans/api/autoupdate/RefreshItemsTest.java
+++ b/autoupdate.services/test/unit/src/org/netbeans/api/autoupdate/RefreshItemsTest.java
@@ -37,10 +37,10 @@ public void testRefreshItems () throws IOException {
         assertEquals(result.toString(), 2, result.size());
         int updateUnitsCount = UpdateManager.getDefault().getUpdateUnits(UpdateManager.TYPE.MODULE).size();
         
-        UpdateUnit toTest = UpdateManagerImpl.getInstance ().getUpdateUnit ("org.yourorghere.refresh-providers-test");
-        assertNotNull ("UpdateUnit for org.yourorghere.refresh-providers-test found.", toTest);
+        UpdateUnit toTest = UpdateManagerImpl.getInstance ().getUpdateUnit ("org.yourorghere.refresh_providers_test");
+        assertNotNull ("UpdateUnit for org.yourorghere.refresh_providers_test found.", toTest);
         UpdateElement toTestElement = toTest.getAvailableUpdates().get (0);
-        assertNotNull ("UpdateElement for org.yourorghere.refresh-providers-test found.", toTestElement);
+        assertNotNull ("UpdateElement for org.yourorghere.refresh_providers_test found.", toTestElement);
         assertTrue (toTestElement + " needs restart.", toTestElement.impl.getInstallInfo().needsRestart ());
         
         populateCatalog(TestUtils.class.getResourceAsStream("data/updates-subset.xml"));
@@ -48,11 +48,11 @@ public void testRefreshItems () throws IOException {
         assertEquals(UpdateManager.getDefault().getUpdateUnits(UpdateManager.TYPE.MODULE).toString(), 
                 updateUnitsCount - 2, UpdateManager.getDefault().getUpdateUnits(UpdateManager.TYPE.MODULE).size());
         
-        UpdateUnit toTestAgain = UpdateManagerImpl.getInstance ().getUpdateUnit ("org.yourorghere.refresh-providers-test");
-        assertNotNull ("Unit for org.yourorghere.refresh-providers-test found.", toTestAgain);
+        UpdateUnit toTestAgain = UpdateManagerImpl.getInstance ().getUpdateUnit ("org.yourorghere.refresh_providers_test");
+        assertNotNull ("Unit for org.yourorghere.refresh_providers_test found.", toTestAgain);
         
         UpdateElement toTestAgainElement = toTestAgain.getAvailableUpdates().get (0);
-        assertNotNull ("UpdateElement for org.yourorghere.refresh-providers-test found.", toTestAgainElement);
+        assertNotNull ("UpdateElement for org.yourorghere.refresh_providers_test found.", toTestAgainElement);
         
         assertFalse ("First unit is not as same as second unit.", 
                 System.identityHashCode(toTest) == System.identityHashCode(toTestAgain));
diff --git a/autoupdate.services/test/unit/src/org/netbeans/api/autoupdate/UpdateProviderFactoryCreateTest.java b/autoupdate.services/test/unit/src/org/netbeans/api/autoupdate/UpdateProviderFactoryCreateTest.java
index 5da38116a..796add383 100644
--- a/autoupdate.services/test/unit/src/org/netbeans/api/autoupdate/UpdateProviderFactoryCreateTest.java
+++ b/autoupdate.services/test/unit/src/org/netbeans/api/autoupdate/UpdateProviderFactoryCreateTest.java
@@ -23,7 +23,9 @@
 import java.util.List;
 import org.netbeans.junit.MockServices;
 import org.netbeans.junit.NbTestCase;
+import org.netbeans.modules.autoupdate.services.UpdateUnitFactoryTest;
 import org.netbeans.modules.autoupdate.updateprovider.AutoupdateCatalogProvider;
+import org.netbeans.modules.autoupdate.updateprovider.AutoupdateInfoParserTest;
 
 /**
  *
@@ -49,7 +51,7 @@ protected void tearDown () throws  Exception {
     public void testCreate () throws Exception {
         String name = "new-one";
         String displayName = "Newone";
-        URL url = getClass().getResource ("/org/netbeans/modules/autoupdate/updateprovider/data/catalog.xml");
+        URL url = AutoupdateInfoParserTest.class.getResource ("data/catalog.xml");
         
         UpdateUnitProvider newone = UpdateUnitProviderFactory.getDefault ().create(name, displayName, url);
         assertNotNull ("New provider was created.", newone);
@@ -70,13 +72,13 @@ public void testCreate () throws Exception {
 
     public static class MyProvider extends AutoupdateCatalogProvider {
         public MyProvider () {
-            super ("test-updates-provider", "test-updates-provider", UpdateProviderFactoryCreateTest.class.getResource ("/org/netbeans/modules/autoupdate/updateprovider/data/catalog.xml"));
+            super ("test-updates-provider", "test-updates-provider", UpdateUnitFactoryTest.class.getResource ("data/catalog.xml"));
         }
     }
     
     public static class MyProvider2 extends AutoupdateCatalogProvider {
         public MyProvider2 () {
-            super ("test-updates-provider-2", "test-updates-provider-2", UpdateProviderFactoryCreateTest.class.getResource ("/org/netbeans/modules/autoupdate/updateprovider/data/catalog.xml"));
+            super ("test-updates-provider-2", "test-updates-provider-2", UpdateUnitFactoryTest.class.getResource ("data/catalog.xml"));
         }
     }
 }
diff --git a/autoupdate.services/test/unit/src/org/netbeans/api/autoupdate/UpdateProviderFactoryTest.java b/autoupdate.services/test/unit/src/org/netbeans/api/autoupdate/UpdateProviderFactoryTest.java
index 43ab8b295..d33bed604 100644
--- a/autoupdate.services/test/unit/src/org/netbeans/api/autoupdate/UpdateProviderFactoryTest.java
+++ b/autoupdate.services/test/unit/src/org/netbeans/api/autoupdate/UpdateProviderFactoryTest.java
@@ -22,6 +22,7 @@
 import java.util.List;
 import org.netbeans.junit.MockServices;
 import org.netbeans.junit.NbTestCase;
+import org.netbeans.modules.autoupdate.services.UpdateUnitFactoryTest;
 import org.netbeans.modules.autoupdate.updateprovider.AutoupdateCatalogProvider;
 
 /**
@@ -70,13 +71,13 @@ public void testSetEnable () {
 
     public static class MyProvider extends AutoupdateCatalogProvider {
         public MyProvider () {
-            super ("test-updates-provider", "test-updates-provider", UpdateProviderFactoryTest.class.getResource ("data/catalog.xml"));
+            super ("test-updates-provider", "test-updates-provider", UpdateUnitFactoryTest.class.getResource ("data/catalog.xml"));
         }
     }
     
     public static class MyProvider2 extends AutoupdateCatalogProvider {
         public MyProvider2 () {
-            super ("test-updates-provider-2", "test-updates-provider-2", UpdateProviderFactoryTest.class.getResource ("/org/netbeans/modules/autoupdate/updateprovider/data/catalog.xml"));
+            super ("test-updates-provider-2", "test-updates-provider-2", UpdateUnitFactoryTest.class.getResource ("data/catalog.xml"));
         }
     }
 }
diff --git a/autoupdate.services/test/unit/src/org/netbeans/api/autoupdate/data/catalog.xml b/autoupdate.services/test/unit/src/org/netbeans/api/autoupdate/data/catalog.xml
new file mode 100644
index 000000000..da07613e1
--- /dev/null
+++ b/autoupdate.services/test/unit/src/org/netbeans/api/autoupdate/data/catalog.xml
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+
+<!DOCTYPE module_updates PUBLIC "-//NetBeans//DTD Autoupdate Catalog 2.6//EN" "http://www.netbeans.org/dtds/autoupdate-catalog-2_6.dtd">
+<!--
+
+    Licensed to the Apache Software Foundation (ASF) under one
+    or more contributor license agreements.  See the NOTICE file
+    distributed with this work for additional information
+    regarding copyright ownership.  The ASF licenses this file
+    to you under the Apache License, Version 2.0 (the
+    "License"); you may not use this file except in compliance
+    with the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing,
+    software distributed under the License is distributed on an
+    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+    KIND, either express or implied.  See the License for the
+    specific language governing permissions and limitations
+    under the License.
+
+-->
+<module_updates timestamp="10/28/20/22/11/2017">
+
+    <module codenamebase="org.openide.io" distribution="" downloadsize="0" homepage="" license="AD9FBBC9" moduleauthor="" needsrestart="false" releasedate="2017/11/22">
+        <manifest AutoUpdate-Show-In-Client="true" OpenIDE-Module="org.openide.io" OpenIDE-Module-Implementation-Version="171117" OpenIDE-Module-Java-Dependencies="Java &gt; 1.7" OpenIDE-Module-Requires="org.openide.modules.ModuleFormat1" OpenIDE-Module-Specification-Version="1000.0"/>
+
+    </module>
+
+<license name="AD9FBBC9">[NO LICENSE SPECIFIED]
+</license>
+</module_updates>
diff --git a/autoupdate.services/test/unit/src/org/netbeans/api/autoupdate/data/com-example-testmodule-cluster.nbm b/autoupdate.services/test/unit/src/org/netbeans/api/autoupdate/data/com-example-testmodule-cluster.nbm
new file mode 100644
index 000000000..664c2d710
Binary files /dev/null and b/autoupdate.services/test/unit/src/org/netbeans/api/autoupdate/data/com-example-testmodule-cluster.nbm differ
diff --git a/autoupdate.services/test/unit/src/org/netbeans/api/autoupdate/data/dummy-signed-twice.jar b/autoupdate.services/test/unit/src/org/netbeans/api/autoupdate/data/dummy-signed-twice.jar
new file mode 100644
index 000000000..60f11c444
Binary files /dev/null and b/autoupdate.services/test/unit/src/org/netbeans/api/autoupdate/data/dummy-signed-twice.jar differ
diff --git a/autoupdate.services/test/unit/src/org/netbeans/api/autoupdate/data/dummy-signed.jar b/autoupdate.services/test/unit/src/org/netbeans/api/autoupdate/data/dummy-signed.jar
new file mode 100644
index 000000000..3926208e6
Binary files /dev/null and b/autoupdate.services/test/unit/src/org/netbeans/api/autoupdate/data/dummy-signed.jar differ
diff --git a/autoupdate.services/test/unit/src/org/netbeans/api/autoupdate/data/empty.jar b/autoupdate.services/test/unit/src/org/netbeans/api/autoupdate/data/empty.jar
new file mode 100644
index 000000000..0b653c49d
Binary files /dev/null and b/autoupdate.services/test/unit/src/org/netbeans/api/autoupdate/data/empty.jar differ
diff --git a/autoupdate.services/test/unit/src/org/netbeans/api/autoupdate/data/org-yourorghere-brokendepending.nbm b/autoupdate.services/test/unit/src/org/netbeans/api/autoupdate/data/org-yourorghere-brokendepending.nbm
new file mode 100644
index 000000000..fb3988d60
Binary files /dev/null and b/autoupdate.services/test/unit/src/org/netbeans/api/autoupdate/data/org-yourorghere-brokendepending.nbm differ
diff --git a/autoupdate.services/test/unit/src/org/netbeans/api/autoupdate/data/org-yourorghere-depending.nbm b/autoupdate.services/test/unit/src/org/netbeans/api/autoupdate/data/org-yourorghere-depending.nbm
new file mode 100644
index 000000000..b67476f61
Binary files /dev/null and b/autoupdate.services/test/unit/src/org/netbeans/api/autoupdate/data/org-yourorghere-depending.nbm differ
diff --git a/autoupdate.services/test/unit/src/org/netbeans/api/autoupdate/data/org-yourorghere-depending_on_new_one_engine.nbm b/autoupdate.services/test/unit/src/org/netbeans/api/autoupdate/data/org-yourorghere-depending_on_new_one_engine.nbm
new file mode 100644
index 000000000..6f247f2e9
Binary files /dev/null and b/autoupdate.services/test/unit/src/org/netbeans/api/autoupdate/data/org-yourorghere-depending_on_new_one_engine.nbm differ
diff --git a/autoupdate.services/test/unit/src/org/netbeans/api/autoupdate/data/org-yourorghere-engine-1-1.nbm b/autoupdate.services/test/unit/src/org/netbeans/api/autoupdate/data/org-yourorghere-engine-1-1.nbm
new file mode 100644
index 000000000..acb9a3ad8
Binary files /dev/null and b/autoupdate.services/test/unit/src/org/netbeans/api/autoupdate/data/org-yourorghere-engine-1-1.nbm differ
diff --git a/autoupdate.services/test/unit/src/org/netbeans/api/autoupdate/data/org-yourorghere-engine-1-2.nbm b/autoupdate.services/test/unit/src/org/netbeans/api/autoupdate/data/org-yourorghere-engine-1-2.nbm
new file mode 100644
index 000000000..85cfe734a
Binary files /dev/null and b/autoupdate.services/test/unit/src/org/netbeans/api/autoupdate/data/org-yourorghere-engine-1-2.nbm differ
diff --git a/autoupdate.services/test/unit/src/org/netbeans/api/autoupdate/data/org-yourorghere-engine.nbm b/autoupdate.services/test/unit/src/org/netbeans/api/autoupdate/data/org-yourorghere-engine.nbm
new file mode 100644
index 000000000..21d95443a
Binary files /dev/null and b/autoupdate.services/test/unit/src/org/netbeans/api/autoupdate/data/org-yourorghere-engine.nbm differ
diff --git a/autoupdate.services/test/unit/src/org/netbeans/api/autoupdate/data/org-yourorghere-executable-permissions.nbm b/autoupdate.services/test/unit/src/org/netbeans/api/autoupdate/data/org-yourorghere-executable-permissions.nbm
new file mode 100644
index 000000000..dc403dcad
Binary files /dev/null and b/autoupdate.services/test/unit/src/org/netbeans/api/autoupdate/data/org-yourorghere-executable-permissions.nbm differ
diff --git a/autoupdate.services/test/unit/src/org/netbeans/api/autoupdate/data/org-yourorghere-independent-1-1.nbm b/autoupdate.services/test/unit/src/org/netbeans/api/autoupdate/data/org-yourorghere-independent-1-1.nbm
new file mode 100644
index 000000000..b10638bb4
Binary files /dev/null and b/autoupdate.services/test/unit/src/org/netbeans/api/autoupdate/data/org-yourorghere-independent-1-1.nbm differ
diff --git a/autoupdate.services/test/unit/src/org/netbeans/api/autoupdate/data/org-yourorghere-independent.nbm b/autoupdate.services/test/unit/src/org/netbeans/api/autoupdate/data/org-yourorghere-independent.nbm
new file mode 100644
index 000000000..538978caf
Binary files /dev/null and b/autoupdate.services/test/unit/src/org/netbeans/api/autoupdate/data/org-yourorghere-independent.nbm differ
diff --git a/autoupdate.services/test/unit/src/org/netbeans/api/autoupdate/data/org-yourorghere-refresh_providers_test.nbm b/autoupdate.services/test/unit/src/org/netbeans/api/autoupdate/data/org-yourorghere-refresh_providers_test.nbm
new file mode 100644
index 000000000..5e981dd45
Binary files /dev/null and b/autoupdate.services/test/unit/src/org/netbeans/api/autoupdate/data/org-yourorghere-refresh_providers_test.nbm differ
diff --git a/autoupdate.services/test/unit/src/org/netbeans/api/autoupdate/data/test-keystore.jks b/autoupdate.services/test/unit/src/org/netbeans/api/autoupdate/data/test-keystore.jks
new file mode 100644
index 000000000..eb8dfb194
Binary files /dev/null and b/autoupdate.services/test/unit/src/org/netbeans/api/autoupdate/data/test-keystore.jks differ
diff --git a/autoupdate.services/test/unit/src/org/netbeans/api/autoupdate/data/updates-subset.xml b/autoupdate.services/test/unit/src/org/netbeans/api/autoupdate/data/updates-subset.xml
index 13fdd20b4..71f17764c 100644
--- a/autoupdate.services/test/unit/src/org/netbeans/api/autoupdate/data/updates-subset.xml
+++ b/autoupdate.services/test/unit/src/org/netbeans/api/autoupdate/data/updates-subset.xml
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8" ?>
 
-<!DOCTYPE module_updates PUBLIC "-//NetBeans//DTD Autoupdate Catalog 2.3//EN" "http://www.netbeans.org/dtds/autoupdate-catalog-2_3.dtd">
+<!DOCTYPE module_updates PUBLIC "-//NetBeans//DTD Autoupdate Catalog 2.6//EN" "http://www.netbeans.org/dtds/autoupdate-catalog-2_6.dtd">
 <!--
 
     Licensed to the Apache Software Foundation (ASF) under one
@@ -21,46 +21,37 @@
     under the License.
 
 -->
-<module_updates timestamp="31/17/17/31/01/2007">
+<module_updates timestamp="10/28/20/17/11/2017">
 
-
-<module codenamebase="org.yourorghere.depending" distribution="nbresloc:/org/netbeans/api/autoupdate/data/org-yourorghere-depending.nbm" downloadsize="2642" homepage="" license="AD9FBBC9" moduleauthor="" needsrestart="false" releasedate="2007/01/30">
-    <manifest OpenIDE-Module="org.yourorghere.depending" OpenIDE-Module-Implementation-Version="070130" OpenIDE-Module-Java-Dependencies="Java &gt; 1.4" OpenIDE-Module-Module-Dependencies="org.yourorghere.engine &gt; 1.0" OpenIDE-Module-Name="depending" OpenIDE-Module-Requires="org.openide.modules.ModuleFormat1" OpenIDE-Module-Specification-Version="1.0"/>
+    <module codenamebase="org.yourorghere.depending" distribution="nbresloc:/org/netbeans/api/autoupdate/data/org-yourorghere-depending.nbm" downloadsize="3186" homepage="" license="AD9FBBC9" moduleauthor="Steffen Dietz" needsrestart="false" releasedate="2017/11/17">
+        <manifest AutoUpdate-Show-In-Client="true" OpenIDE-Module="org.yourorghere.depending" OpenIDE-Module-Implementation-Version="171117" OpenIDE-Module-Java-Dependencies="Java &gt; 1.7" OpenIDE-Module-Module-Dependencies="org.yourorghere.engine &gt; 1.0, org.yourorghere.independent &gt; 1.0" OpenIDE-Module-Name="depending" OpenIDE-Module-Requires="org.openide.modules.ModuleFormat1" OpenIDE-Module-Specification-Version="1.0"/>
     
-</module>
+    </module>
 
-<module codenamebase="org.yourorghere.depending_on_new_one_engine" distribution="nbresloc:/org/netbeans/api/autoupdate/data/org-yourorghere-depending_on_new_one_engine.nbm" downloadsize="2642" homepage="" license="AD9FBBC9" moduleauthor="" needsrestart="false" releasedate="2007/01/30">
-    <manifest OpenIDE-Module="org.yourorghere.depending_on_new_one_engine" OpenIDE-Module-Implementation-Version="070130" OpenIDE-Module-Java-Dependencies="Java &gt; 1.4"
-    OpenIDE-Module-Module-Dependencies="org.yourorghere.engine &gt; 1.1" OpenIDE-Module-Name="depending_on_new_one_engine" OpenIDE-Module-Requires="org.openide.modules.ModuleFormat1" OpenIDE-Module-Specification-Version="1.0"/>
+    <module codenamebase="org.yourorghere.depending_on_new_one_engine" distribution="nbresloc:/org/netbeans/api/autoupdate/data/org-yourorghere-depending_on_new_one_engine.nbm" downloadsize="3263" homepage="" license="AD9FBBC9" moduleauthor="Steffen Dietz" needsrestart="false" releasedate="2017/11/17">
+        <manifest AutoUpdate-Show-In-Client="true" OpenIDE-Module="org.yourorghere.depending_on_new_one_engine" OpenIDE-Module-Implementation-Version="171117" OpenIDE-Module-Java-Dependencies="Java &gt; 1.7" OpenIDE-Module-Module-Dependencies="org.yourorghere.engine &gt; 1.0" OpenIDE-Module-Name="depending_on_new_one_engine" OpenIDE-Module-Requires="org.openide.modules.ModuleFormat1" OpenIDE-Module-Specification-Version="1.0"/>
     
-</module>
+    </module>
 
-<!--<module codenamebase="org.yourorghere.brokendepending" distribution="nbresloc:/org/netbeans/api/autoupdate/data/org-yourorghere-brokendepending.nbm" downloadsize="2642" homepage="" license="AD9FBBC9" moduleauthor="" needsrestart="false" releasedate="2007/01/30">
-    <manifest OpenIDE-Module="org.yourorghere.brokendepending" OpenIDE-Module-Implementation-Version="070130" OpenIDE-Module-Java-Dependencies="Java &gt; 1.4" OpenIDE-Module-Module-Dependencies="org.yourorghere.unreachable &gt; 1.0" OpenIDE-Module-Name="brokendepending" OpenIDE-Module-Requires="org.openide.modules.ModuleFormat1" OpenIDE-Module-Specification-Version="1.0"/>
+    <module codenamebase="org.yourorghere.engine" distribution="nbresloc:/org/netbeans/api/autoupdate/data/org-yourorghere-engine.nbm" downloadsize="3136" homepage="" license="AD9FBBC9" moduleauthor="Steffen Dietz" needsrestart="false" releasedate="2017/11/17">
+        <manifest AutoUpdate-Show-In-Client="true" OpenIDE-Module="org.yourorghere.engine" OpenIDE-Module-Implementation-Version="171117" OpenIDE-Module-Java-Dependencies="Java &gt; 1.7" OpenIDE-Module-Module-Dependencies="org.yourorghere.independent &gt; 1.0" OpenIDE-Module-Name="engine" OpenIDE-Module-Requires="org.openide.modules.ModuleFormat1" OpenIDE-Module-Specification-Version="1.0"/>
     
-</module>-->
-
+    </module>
 
-<module codenamebase="org.yourorghere.engine"
-  distribution="nbresloc:/org/netbeans/api/autoupdate/data/org-yourorghere-engine.nbm" downloadsize="2809" homepage="" license="AD9FBBC9" moduleauthor="" needsrestart="false" releasedate="2007/01/31">
-    <manifest OpenIDE-Module="org.yourorghere.engine" OpenIDE-Module-Implementation-Version="070131" OpenIDE-Module-Java-Dependencies="Java &gt; 1.4" OpenIDE-Module-Module-Dependencies="org.yourorghere.independent &gt; 1.0" OpenIDE-Module-Name="engine" OpenIDE-Module-Requires="org.openide.modules.ModuleFormat1" OpenIDE-Module-Specification-Version="1.0"/>
+    <module codenamebase="org.yourorghere.engine" distribution="nbresloc:/org/netbeans/api/autoupdate/data/org-yourorghere-engine-1-1.nbm" downloadsize="3136" homepage="" license="AD9FBBC9" moduleauthor="Steffen Dietz" needsrestart="false" releasedate="2017/11/17">
+        <manifest AutoUpdate-Show-In-Client="true" OpenIDE-Module="org.yourorghere.engine" OpenIDE-Module-Implementation-Version="171117" OpenIDE-Module-Java-Dependencies="Java &gt; 1.7" OpenIDE-Module-Module-Dependencies="org.yourorghere.independent &gt; 1.0" OpenIDE-Module-Name="engine" OpenIDE-Module-Requires="org.openide.modules.ModuleFormat1" OpenIDE-Module-Specification-Version="1.1"/>
     
-</module>
-
-<module codenamebase="org.yourorghere.engine"
-  distribution="nbresloc:/org/netbeans/api/autoupdate/data/org-yourorghere-engine-1-1.nbm" downloadsize="2815" homepage="" license="AD9FBBC9" moduleauthor="" needsrestart="false" releasedate="2007/01/31">
-    <manifest OpenIDE-Module="org.yourorghere.engine" OpenIDE-Module-Implementation-Version="070131" OpenIDE-Module-Java-Dependencies="Java &gt; 1.4" OpenIDE-Module-Module-Dependencies="org.yourorghere.independent &gt; 1.0" OpenIDE-Module-Name="engine" OpenIDE-Module-Requires="org.openide.modules.ModuleFormat1" OpenIDE-Module-Specification-Version="1.1"/>
-</module>
+    </module>
 
-<module codenamebase="org.yourorghere.independent" distribution="nbresloc:/org/netbeans/api/autoupdate/data/org-yourorghere-independent.nbm" downloadsize="2633" homepage="" license="AD9FBBC9" moduleauthor="" needsrestart="false" releasedate="2007/01/30">
-    <manifest OpenIDE-Module="org.yourorghere.independent" OpenIDE-Module-Implementation-Version="070130" OpenIDE-Module-Java-Dependencies="Java &gt; 1.4" OpenIDE-Module-Name="independent" OpenIDE-Module-Requires="org.openide.modules.ModuleFormat1" OpenIDE-Module-Specification-Version="1.0"/>
+    <module codenamebase="org.yourorghere.independent" distribution="nbresloc:/org/netbeans/api/autoupdate/data/org-yourorghere-independent.nbm" downloadsize="3128" homepage="" license="AD9FBBC9" moduleauthor="Steffen Dietz" needsrestart="false" releasedate="2017/11/17">
+        <manifest AutoUpdate-Show-In-Client="true" OpenIDE-Module="org.yourorghere.independent" OpenIDE-Module-Implementation-Version="171117" OpenIDE-Module-Java-Dependencies="Java &gt; 1.7" OpenIDE-Module-Name="independent" OpenIDE-Module-Requires="org.openide.modules.ModuleFormat1" OpenIDE-Module-Specification-Version="1.0"/>
     
-</module>
+    </module>
 
-<module codenamebase="org.yourorghere.refresh-providers-test" distribution="nbresloc:/org/netbeans/api/autoupdate/data/refresh-providers-test.nbm" downloadsize="2633" homepage="" license="AD9FBBC9" moduleauthor="" needsrestart="false" releasedate="2007/01/30">
-    <manifest OpenIDE-Module="org.yourorghere.refresh-providers-test" OpenIDE-Module-Implementation-Version="070130" OpenIDE-Module-Java-Dependencies="Java &gt; 1.4" OpenIDE-Module-Name="refresh-providers-test" OpenIDE-Module-Requires="org.openide.modules.ModuleFormat1" OpenIDE-Module-Specification-Version="1.0"/>
+    <module codenamebase="org.yourorghere.refresh_providers_test" distribution="nbresloc:/org/netbeans/api/autoupdate/data/org-yourorghere-refresh_providers_test.nbm" downloadsize="3206" homepage="" license="AD9FBBC9" moduleauthor="Steffen Dietz" needsrestart="false" releasedate="2017/11/17">
+        <manifest AutoUpdate-Show-In-Client="true" OpenIDE-Module="org.yourorghere.refresh_providers_test" OpenIDE-Module-Implementation-Version="171117" OpenIDE-Module-Java-Dependencies="Java &gt; 1.7" OpenIDE-Module-Name="refresh_providers_test" OpenIDE-Module-Requires="org.openide.modules.ModuleFormat1" OpenIDE-Module-Specification-Version="1.0"/>
     
-</module>
+    </module>
 
 <license name="AD9FBBC9">[NO LICENSE SPECIFIED]
 </license>
diff --git a/autoupdate.services/test/unit/src/org/netbeans/api/autoupdate/data/updates.xml b/autoupdate.services/test/unit/src/org/netbeans/api/autoupdate/data/updates.xml
index 884875121..f9c9facf7 100644
--- a/autoupdate.services/test/unit/src/org/netbeans/api/autoupdate/data/updates.xml
+++ b/autoupdate.services/test/unit/src/org/netbeans/api/autoupdate/data/updates.xml
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8" ?>
 
-<!DOCTYPE module_updates PUBLIC "-//NetBeans//DTD Autoupdate Catalog 2.5//EN" "http://www.netbeans.org/dtds/autoupdate-catalog-2_5.dtd">
+<!DOCTYPE module_updates PUBLIC "-//NetBeans//DTD Autoupdate Catalog 2.6//EN" "http://www.netbeans.org/dtds/autoupdate-catalog-2_6.dtd">
 <!--
 
     Licensed to the Apache Software Foundation (ASF) under one
@@ -21,49 +21,47 @@
     under the License.
 
 -->
-<module_updates timestamp="31/17/17/31/01/2007">
-    
-<module codenamebase="org.yourorghere.depending" distribution="nbresloc:/org/netbeans/api/autoupdate/data/org-yourorghere-depending.nbm" downloadsize="2642" homepage="" license="AD9FBBC9" moduleauthor="" needsrestart="false" releasedate="2007/01/30">
-    <manifest OpenIDE-Module="org.yourorghere.depending" OpenIDE-Module-Implementation-Version="070130" OpenIDE-Module-Java-Dependencies="Java &gt; 1.4" OpenIDE-Module-Module-Dependencies="org.yourorghere.engine &gt; 1.0" OpenIDE-Module-Name="depending" OpenIDE-Module-Requires="org.openide.modules.ModuleFormat1" OpenIDE-Module-Specification-Version="1.0"/>
-    
-</module>
+<module_updates timestamp="10/28/20/17/11/2017">
 
-<module codenamebase="org.yourorghere.depending_on_new_one_engine" distribution="nbresloc:/org/netbeans/api/autoupdate/data/org-yourorghere-depending_on_new_one_engine.nbm" downloadsize="2642" homepage="" license="AD9FBBC9" moduleauthor="" needsrestart="false" releasedate="2007/01/30">
-    <manifest OpenIDE-Module="org.yourorghere.depending_on_new_one_engine" OpenIDE-Module-Implementation-Version="070130" OpenIDE-Module-Java-Dependencies="Java &gt; 1.4"
-    OpenIDE-Module-Module-Dependencies="org.yourorghere.engine &gt; 1.1" OpenIDE-Module-Name="depending_on_new_one_engine" OpenIDE-Module-Requires="org.openide.modules.ModuleFormat1" OpenIDE-Module-Specification-Version="1.0"/>
+    <module codenamebase="org.yourorghere.brokendepending" distribution="nbresloc:/org/netbeans/api/autoupdate/data/org-yourorghere-brokendepending.nbm" downloadsize="3208" homepage="" license="AD9FBBC9" moduleauthor="Steffen Dietz" needsrestart="false" releasedate="2017/11/17">
+        <manifest AutoUpdate-Show-In-Client="true" OpenIDE-Module="org.yourorghere.brokendepending" OpenIDE-Module-Implementation-Version="171117" OpenIDE-Module-Java-Dependencies="Java &gt; 1.7" OpenIDE-Module-Module-Dependencies="org.yourorghere.unreachable &gt; 1.0" OpenIDE-Module-Name="brokendepending" OpenIDE-Module-Requires="org.openide.modules.ModuleFormat1" OpenIDE-Module-Specification-Version="1.0"/>
     
-</module>
+    </module>
 
-<module codenamebase="org.yourorghere.brokendepending" distribution="nbresloc:/org/netbeans/api/autoupdate/data/org-yourorghere-brokendepending.nbm" downloadsize="2642" homepage="" license="AD9FBBC9" moduleauthor="" needsrestart="false" releasedate="2007/01/30">
-    <manifest OpenIDE-Module="org.yourorghere.brokendepending" OpenIDE-Module-Implementation-Version="070130" OpenIDE-Module-Java-Dependencies="Java &gt; 1.4" OpenIDE-Module-Module-Dependencies="org.yourorghere.unreachable &gt; 1.0" OpenIDE-Module-Name="brokendepending" OpenIDE-Module-Requires="org.openide.modules.ModuleFormat1" OpenIDE-Module-Specification-Version="1.0"/>
+    <module codenamebase="org.yourorghere.depending" distribution="nbresloc:/org/netbeans/api/autoupdate/data/org-yourorghere-depending.nbm" downloadsize="3186" homepage="" license="AD9FBBC9" moduleauthor="Steffen Dietz" needsrestart="false" releasedate="2017/11/17">
+        <manifest AutoUpdate-Show-In-Client="true" OpenIDE-Module="org.yourorghere.depending" OpenIDE-Module-Implementation-Version="171117" OpenIDE-Module-Java-Dependencies="Java &gt; 1.7" OpenIDE-Module-Module-Dependencies="org.yourorghere.engine &gt; 1.0, org.yourorghere.independent &gt; 1.0" OpenIDE-Module-Name="depending" OpenIDE-Module-Requires="org.openide.modules.ModuleFormat1" OpenIDE-Module-Specification-Version="1.0"/>
     
-</module>
+    </module>
 
-<module codenamebase="org.yourorghere.engine"
-  distribution="nbresloc:/org/netbeans/api/autoupdate/data/org-yourorghere-engine.nbm" downloadsize="2809" homepage="" license="AD9FBBC9" moduleauthor="" needsrestart="false" releasedate="2007/01/31">
-    <manifest OpenIDE-Module="org.yourorghere.engine" OpenIDE-Module-Implementation-Version="070131" OpenIDE-Module-Java-Dependencies="Java &gt; 1.4" OpenIDE-Module-Module-Dependencies="org.yourorghere.independent &gt; 1.0" OpenIDE-Module-Name="engine" OpenIDE-Module-Requires="org.openide.modules.ModuleFormat1" OpenIDE-Module-Specification-Version="1.0"/>
+    <module codenamebase="org.yourorghere.depending_on_new_one_engine" distribution="nbresloc:/org/netbeans/api/autoupdate/data/org-yourorghere-depending_on_new_one_engine.nbm" downloadsize="3263" homepage="" license="AD9FBBC9" moduleauthor="Steffen Dietz" needsrestart="false" releasedate="2017/11/17">
+        <manifest AutoUpdate-Show-In-Client="true" OpenIDE-Module="org.yourorghere.depending_on_new_one_engine" OpenIDE-Module-Implementation-Version="171117" OpenIDE-Module-Java-Dependencies="Java &gt; 1.7" OpenIDE-Module-Module-Dependencies="org.yourorghere.engine &gt; 1.0" OpenIDE-Module-Name="depending_on_new_one_engine" OpenIDE-Module-Requires="org.openide.modules.ModuleFormat1" OpenIDE-Module-Specification-Version="1.0"/>
     
-</module>
+    </module>
+
+    <module codenamebase="org.yourorghere.engine" distribution="nbresloc:/org/netbeans/api/autoupdate/data/org-yourorghere-engine.nbm" downloadsize="3136" homepage="" license="AD9FBBC9" moduleauthor="Steffen Dietz" needsrestart="false" releasedate="2017/11/17">
+        <manifest AutoUpdate-Show-In-Client="true" OpenIDE-Module="org.yourorghere.engine" OpenIDE-Module-Implementation-Version="171117" OpenIDE-Module-Java-Dependencies="Java &gt; 1.7" OpenIDE-Module-Module-Dependencies="org.yourorghere.independent &gt; 1.0" OpenIDE-Module-Name="engine" OpenIDE-Module-Requires="org.openide.modules.ModuleFormat1" OpenIDE-Module-Specification-Version="1.0"/>
 
-<module codenamebase="org.yourorghere.engine"
-  distribution="nbresloc:/org/netbeans/api/autoupdate/data/org-yourorghere-engine-1-1.nbm" downloadsize="2815" homepage="" license="AD9FBBC9" moduleauthor="" needsrestart="false" releasedate="2007/01/31">
-    <manifest OpenIDE-Module="org.yourorghere.engine" OpenIDE-Module-Implementation-Version="070131" OpenIDE-Module-Java-Dependencies="Java &gt; 1.4" OpenIDE-Module-Module-Dependencies="org.yourorghere.independent &gt; 1.0" OpenIDE-Module-Name="engine" OpenIDE-Module-Requires="org.openide.modules.ModuleFormat1" OpenIDE-Module-Specification-Version="1.1"/>
-</module>
+    </module>
 
-<module codenamebase="org.yourorghere.independent" distribution="nbresloc:/org/netbeans/api/autoupdate/data/org-yourorghere-independent.nbm" downloadsize="2633" homepage="" license="AD9FBBC9" moduleauthor="" needsrestart="false" releasedate="2007/01/30">
-    <manifest OpenIDE-Module="org.yourorghere.independent" OpenIDE-Module-Implementation-Version="070130" OpenIDE-Module-Java-Dependencies="Java &gt; 1.4" OpenIDE-Module-Name="independent" OpenIDE-Module-Requires="org.openide.modules.ModuleFormat1" OpenIDE-Module-Specification-Version="1.0"/>
+    <module codenamebase="org.yourorghere.engine" distribution="nbresloc:/org/netbeans/api/autoupdate/data/org-yourorghere-engine-1-1.nbm" downloadsize="3136" homepage="" license="AD9FBBC9" moduleauthor="Steffen Dietz" needsrestart="false" releasedate="2017/11/17">
+        <manifest AutoUpdate-Show-In-Client="true" OpenIDE-Module="org.yourorghere.engine" OpenIDE-Module-Implementation-Version="171117" OpenIDE-Module-Java-Dependencies="Java &gt; 1.7" OpenIDE-Module-Module-Dependencies="org.yourorghere.independent &gt; 1.0" OpenIDE-Module-Name="engine" OpenIDE-Module-Requires="org.openide.modules.ModuleFormat1" OpenIDE-Module-Specification-Version="1.1"/>
     
-</module>
+    </module>
 
-<module codenamebase="org.yourorghere.refresh-providers-test" distribution="nbresloc:/org/netbeans/api/autoupdate/data/refresh-providers-test.nbm" downloadsize="2633" homepage="" license="AD9FBBC9" moduleauthor="" needsrestart="true" releasedate="2007/01/30">
-    <manifest OpenIDE-Module="org.yourorghere.refresh-providers-test" OpenIDE-Module-Implementation-Version="070130" OpenIDE-Module-Java-Dependencies="Java &gt; 1.4" OpenIDE-Module-Name="refresh-providers-test" OpenIDE-Module-Requires="org.openide.modules.ModuleFormat1" OpenIDE-Module-Specification-Version="1.0"/>
+    <module codenamebase="org.yourorghere.independent" distribution="nbresloc:/org/netbeans/api/autoupdate/data/org-yourorghere-independent.nbm" downloadsize="3128" homepage="" license="AD9FBBC9" moduleauthor="Steffen Dietz" needsrestart="false" releasedate="2017/11/17">
+        <manifest AutoUpdate-Show-In-Client="true" OpenIDE-Module="org.yourorghere.independent" OpenIDE-Module-Implementation-Version="171117" OpenIDE-Module-Java-Dependencies="Java &gt; 1.7" OpenIDE-Module-Name="independent" OpenIDE-Module-Requires="org.openide.modules.ModuleFormat1" OpenIDE-Module-Specification-Version="1.0"/>
     
-</module>
+    </module>
 
-<module codenamebase="com.sun.testmodule.cluster" distribution="nbresloc:/org/netbeans/api/autoupdate/data/com-sun-testmodule-cluster.nbm" downloadsize="2515" homepage="" license="AD9FBBC9" moduleauthor="" needsrestart="false" releasedate="2007/01/30" targetcluster="test">
-    <manifest OpenIDE-Module="com.sun.testmodule.cluster" OpenIDE-Module-Implementation-Version="070130" OpenIDE-Module-Java-Dependencies="Java &gt; 1.4" OpenIDE-Module-Name="cluster" OpenIDE-Module-Requires="org.openide.modules.ModuleFormat1" OpenIDE-Module-Specification-Version="1.0"/>
+    <module codenamebase="org.yourorghere.refresh_providers_test" distribution="nbresloc:/org/netbeans/api/autoupdate/data/org-yourorghere-refresh_providers_test.nbm" downloadsize="3206" homepage="" license="AD9FBBC9" moduleauthor="Steffen Dietz" needsrestart="true" releasedate="2017/11/17">
+        <manifest AutoUpdate-Show-In-Client="true" OpenIDE-Module="org.yourorghere.refresh_providers_test" OpenIDE-Module-Implementation-Version="171117" OpenIDE-Module-Java-Dependencies="Java &gt; 1.7" OpenIDE-Module-Name="refresh_providers_test" OpenIDE-Module-Requires="org.openide.modules.ModuleFormat1" OpenIDE-Module-Specification-Version="1.0"/>
     
-</module>
+    </module>
+
+    <module codenamebase="com.example.testmodule.cluster" distribution="nbresloc:/org/netbeans/api/autoupdate/data/com-example-testmodule-cluster.nbm" downloadsize="0" homepage="" license="AD9FBBC9" moduleauthor="Steffen Dietz" needsrestart="false" releasedate="2017/11/17" targetcluster="test">
+        <manifest AutoUpdate-Show-In-Client="true" OpenIDE-Module="com.example.testmodule.cluster" OpenIDE-Module-Implementation-Version="171117" OpenIDE-Module-Java-Dependencies="Java &gt; 1.7" OpenIDE-Module-Name="testmodule_cluster" OpenIDE-Module-Requires="org.openide.modules.ModuleFormat1" OpenIDE-Module-Specification-Version="1.0"/>
+
+    </module>
 
 <license name="AD9FBBC9">[NO LICENSE SPECIFIED]
 </license>
diff --git a/autoupdate.services/test/unit/src/org/netbeans/modules/autoupdate/services/ExecutablePermissionsTestDisabled.java b/autoupdate.services/test/unit/src/org/netbeans/modules/autoupdate/services/ExecutablePermissionsTest.java
similarity index 84%
rename from autoupdate.services/test/unit/src/org/netbeans/modules/autoupdate/services/ExecutablePermissionsTestDisabled.java
rename to autoupdate.services/test/unit/src/org/netbeans/modules/autoupdate/services/ExecutablePermissionsTest.java
index 17458e86c..5d46b089d 100644
--- a/autoupdate.services/test/unit/src/org/netbeans/modules/autoupdate/services/ExecutablePermissionsTestDisabled.java
+++ b/autoupdate.services/test/unit/src/org/netbeans/modules/autoupdate/services/ExecutablePermissionsTest.java
@@ -30,13 +30,13 @@
  *
  * @author Dmitry Lipin
  */
-public class ExecutablePermissionsTestDisabled extends NbmAdvancedTestCase {
+public class ExecutablePermissionsTest extends NbmAdvancedTestCase {
 
     private UpdateProvider p = null;
     private String testModuleVersion = "1.0";
     private String testModuleName = "org.yourorghere.executable.permissions";
 
-    public ExecutablePermissionsTestDisabled(String name) {
+    public ExecutablePermissionsTest(String name) {
         super(name);
     }
 
@@ -52,11 +52,11 @@ public boolean canRun() {
 
     private String generateExecutablePermissionsModuleElement() {
         String res = "\n<module codenamebase=\"" + testModuleName + "\" " +
-                "homepage=\"http://www.netbeans.org/\" distribution=\"nbresloc:/org/netbeans/api/autoupdate/data/org-yourorghere-executable-permissions.nbm\" " +
-                "license=\"standard-nbm-license.txt\" downloadsize=\"5122\" " +
-                "needsrestart=\"false\" moduleauthor=\"\" " +
+                "homepage=\"\" distribution=\"nbresloc:/org/netbeans/api/autoupdate/data/org-yourorghere-executable-permissions.nbm\" " +
+                "license=\"AD9FBBC9\" downloadsize=\"3661\" " +
+                "needsrestart=\"false\" moduleauthor=\"Steffen Dietz\" " +
                 "eager=\"false\" " +
-                "releasedate=\"2006/02/23\">\n";
+                "releasedate=\"2017/11/24\">\n";
         res += "<manifest OpenIDE-Module=\"" + testModuleName + "\" " +
                 "OpenIDE-Module-Name=\"" + testModuleName + "\" " +
                 "AutoUpdate-Show-In-Client=\"true\" " +
@@ -66,7 +66,6 @@ private String generateExecutablePermissionsModuleElement() {
     }
 
     public void testExecutablePermissionsModule() throws IOException {
-        String os = !org.openide.util.Utilities.isUnix() ? "Windows" : "Unix";
         String catalog = generateCatalog(generateExecutablePermissionsModuleElement());
 
         p = createUpdateProvider(catalog);
@@ -87,5 +86,5 @@ public void testExecutablePermissionsModule() throws IOException {
         File f = new File(userDir, "bin/start.sh");
         assertTrue("File " + f + " should exist after module installation", f.exists());
         assertTrue("File " + f + " is not executable after module installation", f.canExecute());
-    }    
+    }
 }
diff --git a/autoupdate.services/test/unit/src/org/netbeans/modules/autoupdate/services/InstallDisabledModuleTest.java b/autoupdate.services/test/unit/src/org/netbeans/modules/autoupdate/services/InstallDisabledModuleTest.java
index 98605a6c1..a00ac7f14 100644
--- a/autoupdate.services/test/unit/src/org/netbeans/modules/autoupdate/services/InstallDisabledModuleTest.java
+++ b/autoupdate.services/test/unit/src/org/netbeans/modules/autoupdate/services/InstallDisabledModuleTest.java
@@ -51,7 +51,7 @@ protected void setUp() throws Exception {
         super.setUp();        
         assertEquals(test.getPath(), System.getProperty("netbeans.dirs"));
         
-        File jar = new File(new File(test, "modules"), "com-sun-testmodule-cluster.jar");
+        File jar = new File(new File(test, "modules"), "com-example-testmodule-cluster.jar");
         jar.getParentFile().mkdirs();
         jar.createNewFile();
         
@@ -60,11 +60,11 @@ protected void setUp() throws Exception {
         OutputStream os = fo.getOutputStream();
         String cfg = "<?xml version='1.0' encoding='UTF-8'?>\n" +
                 "<!DOCTYPE module PUBLIC '-//NetBeans//DTD Module Status 1.0//EN' 'http://www.netbeans.org/dtds/module-status-1_0.dtd'>\n" +
-                "<module name='com.sun.testmodule.cluster'>\n" +
+                "<module name='com.example.testmodule.cluster'>\n" +
                 "   <param name='autoload'>false</param>\n" +
                 "   <param name='eager'>false</param>\n" +
                 "   <param name='enabled'>false</param>\n" +
-                "   <param name='jar'>modules/com-sun-testmodule-cluster.jar</param>\n" +
+                "   <param name='jar'>modules/com-example-testmodule-cluster.jar</param>\n" +
                 "   <param name='reloadable'>false</param>\n" +
                 "   <param name='specversion'>1.0</param>\n" +
                 "</module>\n" +
@@ -86,7 +86,7 @@ boolean writeDownConfigFile() {
     }
 
     protected String moduleCodeNameBaseForTest() {
-        return "com.sun.testmodule.cluster"; //NOI18N
+        return "com.example.testmodule.cluster"; //NOI18N
     }
 
     @RandomlyFails @Override
@@ -103,9 +103,9 @@ public void testSelf() throws Throwable {
         }
         LOG.log(Level.INFO, "Info installModule over with {0}", t);
         
-        File f = new File(new File(new File(new File(System.getProperty("netbeans.user")), "config"), "Modules"), "com-sun-testmodule-cluster.xml");
+        File f = new File(new File(new File(new File(System.getProperty("netbeans.user")), "config"), "Modules"), "com-example-testmodule-cluster.xml");
         LOG.log(Level.INFO, "Does {0} exists: {1}", new Object[]{f, f.exists()});
-        File m = new File(new File(new File(getWorkDir(), "test"), "modules"), "com-sun-testmodule-cluster.jar");
+        File m = new File(new File(new File(getWorkDir(), "test"), "modules"), "com-example-testmodule-cluster.jar");
         LOG.log(Level.INFO, "Does {0} exists: {1}", new Object[]{m, m.exists()});
         if (t != null) {
             throw t;
diff --git a/autoupdate.services/test/unit/src/org/netbeans/modules/autoupdate/services/InstallEagerModuleTest.java b/autoupdate.services/test/unit/src/org/netbeans/modules/autoupdate/services/InstallEagerModuleTest.java
index ce1609ad9..4bbfbd8b0 100644
--- a/autoupdate.services/test/unit/src/org/netbeans/modules/autoupdate/services/InstallEagerModuleTest.java
+++ b/autoupdate.services/test/unit/src/org/netbeans/modules/autoupdate/services/InstallEagerModuleTest.java
@@ -36,11 +36,11 @@
  * @author Jiri Rechtacek
  */
 public class InstallEagerModuleTest extends NbmAdvancedTestCase {
-    
+
     public InstallEagerModuleTest (String testName) {
         super (testName);
     }
-    
+
     public void testIfAutoupdateUnderstandsEagerAttribute () throws IOException {
         // Lookup.getDefault ().lookup (ModuleInfo.class);
         String eagerModule = "com.sun.testmodule.eager";
@@ -60,25 +60,25 @@ public void testIfAutoupdateUnderstandsEagerAttribute () throws IOException {
                     "org.openide.nodes > 6.2",
                     "org.openide.loaders",
                     "org.openide.io")
-                
+
                 );
         AutoupdateCatalogProvider p = createUpdateProvider (catalog);
         p.refresh (true);
         Map<String, UpdateItem> updates = p.getUpdateItems ();
         assertNotNull ("Some modules are installed.", updates);
         assertFalse ("Some modules are installed.", updates.isEmpty ());
-        
-        // check being 
+
+        // check being
         assertTrue (eagerModule + " found in parsed items.", updates.keySet ().contains (eagerModule + "_1.3"));
         assertTrue (regularModule + " found in parsed items.", updates.keySet ().contains (regularModule + "_1.3"));
-        
+
         // check state
         ModuleItem eagerModuleItem = (ModuleItem) Trampoline.SPI.impl (updates.get (eagerModule + "_1.3"));
         ModuleItem regularModuleItem = (ModuleItem) Trampoline.SPI.impl (updates.get (regularModule + "_1.3"));
         assertTrue (eagerModule + " is eager.", eagerModuleItem.isEager () && ! eagerModuleItem.isAutoload ());
         assertFalse (regularModule + " is regular.", regularModuleItem.isEager () || regularModuleItem.isAutoload ());
     }
-    
+
     public void testAquireEargersFromManager () throws IOException {
         String eagerModule = "com.sun.testmodule.eager";
         String regularModule1 = "org.yourorghere.independent";
@@ -89,23 +89,23 @@ public void testAquireEargersFromManager () throws IOException {
                     regularModule2),
                 generateModuleElement (regularModule1, "1.0", null, null, false, false),
                 generateModuleElement (regularModule2, "1.0", null, null, false, false, regularModule1)
-                
+
                 );
 
         UpdateUnitProviderFactory.getDefault ().create ("test-update-provider", "test-update-provider", generateFile (catalog));
         UpdateUnitProviderFactory.getDefault ().refreshProviders (null, true);
-        
+
         Set<UpdateElement> eagerElements = UpdateManagerImpl.getInstance ().getAvailableEagers ();
         assertFalse ("Some available eagers are found.", eagerElements.isEmpty ());
         UpdateUnit ea = UpdateManagerImpl.getInstance ().getUpdateUnit (eagerModule);
         UpdateElement foundEaEl = eagerElements.iterator ().next ();
         UpdateUnit foundEaU = foundEaEl.getUpdateUnit ();
         assertEquals ("Same eager UpdateUnit", ea, foundEaU);
-        
+
         // assertFalse ("Some installed eagers are found.", UpdateManagerImpl.getInstance ().getInstalledEagers ().isEmpty ());
     }
-    
-    public void disable_testInstallRegularModule () throws IOException {
+
+    public void testInstallRegularModule () throws IOException {
         String eagerModule = "com.sun.testmodule.eager";
         String regularModule1 = "org.yourorghere.independent";
         String regularModule2 = "org.yourorghere.engine";
@@ -115,13 +115,13 @@ public void disable_testInstallRegularModule () throws IOException {
                     regularModule2),
                 generateModuleElement (regularModule1, "1.0", null, null, true, false),
                 generateModuleElement (regularModule2, "1.0", null, null, true, false, regularModule1)
-                
+
                 );
 
         AutoupdateCatalogProvider p = createUpdateProvider (catalog);
         p.refresh (true);
         Map<String, UpdateItem> updates = p.getUpdateItems ();
-        
+
         // initial check of updates being and its states
         ModuleItem eagerModuleItem = (ModuleItem) Trampoline.SPI.impl (updates.get (eagerModule + "_1.0"));
         assertFalse (eagerModuleItem.getModuleInfo ().getDependencies () + " are not empty.",
@@ -131,13 +131,13 @@ public void disable_testInstallRegularModule () throws IOException {
         assertTrue (eagerModule + " is eager.", eagerModuleItem.isEager () && ! eagerModuleItem.isAutoload ());
         assertFalse (regularModule1 + " is regular.", regularModule1Item.isEager () || regularModule1Item.isAutoload ());
         assertFalse (regularModule2 + " is regular.", regularModule2Item.isEager () || regularModule2Item.isAutoload ());
-        
+
         // acquire UpdateUnits for test modules
         UpdateUnitProviderFactory.getDefault ().create ("test-update-provider", "test-update-provider", generateFile (catalog));
         UpdateUnitProviderFactory.getDefault ().refreshProviders (null, true);
         UpdateUnit u1 = UpdateManagerImpl.getInstance ().getUpdateUnit (regularModule1);
         assertTrue (UpdateManager.TYPE.KIT_MODULE.equals (u1.getType ()));
-        
+
         //keep it to prevent GC-ed cache in UpdateManagerImpl
         List<UpdateUnit> uuu =   UpdateManagerImpl.getInstance ().getUpdateUnits();
         UpdateUnit u2 = UpdateManagerImpl.getInstance ().getUpdateUnit (regularModule2);
@@ -145,7 +145,7 @@ public void disable_testInstallRegularModule () throws IOException {
         assertNotNull ("Unit " + regularModule1 + " found.", u1);
         assertNotNull ("Unit " + regularModule2 + " found.", u2);
         assertNotNull ("Unit " + eagerModule + " found.", ea);
-        
+
         // install regular module 1
         installUpdateUnit (u1);
 
@@ -153,15 +153,15 @@ public void disable_testInstallRegularModule () throws IOException {
         assertNotNull (u1 + " is installed.", u1.getInstalled ());
         assertNull (u2 + " is not installed.", u2.getInstalled ());
         assertNull (ea + " is not installed.", ea.getInstalled ());
-        
+
         // installe regular module 2
         installUpdateUnit (u2);
-        
+
         // check states installed regular 1 and others
         assertNotNull (u1 + " is installed.", u1.getInstalled ());
         assertNotNull (u2 + " is installed.", u2.getInstalled ());
         assertNotNull (ea + " is must be installed as well because all required modules are on.", ea.getInstalled ());
-        
+
     }
-    
+
 }
diff --git a/autoupdate.services/test/unit/src/org/netbeans/modules/autoupdate/services/InstallHiddenModuleTest.java b/autoupdate.services/test/unit/src/org/netbeans/modules/autoupdate/services/InstallHiddenModuleTest.java
index f06324899..6c6000c6b 100644
--- a/autoupdate.services/test/unit/src/org/netbeans/modules/autoupdate/services/InstallHiddenModuleTest.java
+++ b/autoupdate.services/test/unit/src/org/netbeans/modules/autoupdate/services/InstallHiddenModuleTest.java
@@ -55,7 +55,7 @@ protected void setUp() throws Exception {
     }
 
     protected String moduleCodeNameBaseForTest() {
-        return "com.sun.testmodule.cluster"; //NOI18N
+        return "com.example.testmodule.cluster"; //NOI18N
     }
 
     @RandomlyFails // NB-Core-Build #2967
diff --git a/autoupdate.services/test/unit/src/org/netbeans/modules/autoupdate/services/InstallIntoNewClusterTest.java b/autoupdate.services/test/unit/src/org/netbeans/modules/autoupdate/services/InstallIntoNewClusterTest.java
index 70a2f6bc2..619ff010d 100644
--- a/autoupdate.services/test/unit/src/org/netbeans/modules/autoupdate/services/InstallIntoNewClusterTest.java
+++ b/autoupdate.services/test/unit/src/org/netbeans/modules/autoupdate/services/InstallIntoNewClusterTest.java
@@ -48,7 +48,7 @@ protected void setUp() throws Exception {
     }
 
     protected String moduleCodeNameBaseForTest() {
-        return "com.sun.testmodule.cluster"; //NOI18N
+        return "com.example.testmodule.cluster"; //NOI18N
     }
 
     @RandomlyFails // NB-Core-Build #1191
diff --git a/autoupdate.services/test/unit/src/org/netbeans/modules/autoupdate/services/NbmsInDownloadedTabTest.java b/autoupdate.services/test/unit/src/org/netbeans/modules/autoupdate/services/NbmsInDownloadedTabTest.java
index ea3041377..b3e600d58 100644
--- a/autoupdate.services/test/unit/src/org/netbeans/modules/autoupdate/services/NbmsInDownloadedTabTest.java
+++ b/autoupdate.services/test/unit/src/org/netbeans/modules/autoupdate/services/NbmsInDownloadedTabTest.java
@@ -45,7 +45,7 @@ public NbmsInDownloadedTabTest(String testName) {
         super(testName);
     }
     
-    public void disabledtestNbmDependsOnLowerVersion () throws IOException {
+    public void testNbmDependsOnLowerVersion () throws IOException {
         URL higherEngineURL = TestUtils.class.getResource ("data/org-yourorghere-engine-1-2.nbm");
         assertNotNull ("URL data/org-yourorghere-engine-1-2.nbm exits", higherEngineURL);
         File higherEngineNbm = TestUtils.getFile(this, higherEngineURL);
diff --git a/autoupdate.services/test/unit/src/org/netbeans/modules/autoupdate/services/NewClustersRebootTestDisabled.java b/autoupdate.services/test/unit/src/org/netbeans/modules/autoupdate/services/NewClustersRebootTest.java
similarity index 95%
rename from autoupdate.services/test/unit/src/org/netbeans/modules/autoupdate/services/NewClustersRebootTestDisabled.java
rename to autoupdate.services/test/unit/src/org/netbeans/modules/autoupdate/services/NewClustersRebootTest.java
index d3fe234e7..cda8af5e6 100644
--- a/autoupdate.services/test/unit/src/org/netbeans/modules/autoupdate/services/NewClustersRebootTestDisabled.java
+++ b/autoupdate.services/test/unit/src/org/netbeans/modules/autoupdate/services/NewClustersRebootTest.java
@@ -34,10 +34,10 @@
 import org.openide.util.Lookup;
 import org.openide.util.Utilities;
 
-public class NewClustersRebootTestDisabled extends NbTestCase {
+public class NewClustersRebootTest extends NbTestCase {
     private Logger LOG;
 
-    public NewClustersRebootTestDisabled(String testName) {
+    public NewClustersRebootTest(String testName) {
         super(testName);
     }
 
@@ -58,7 +58,7 @@ protected void setUp() throws Exception {
         super.setUp();
         System.setProperty("netbeans.dirs", getWorkDirPath());
         OutputStream os2 = new FileOutputStream(new File(getWorkDir(),"nbmfortest"));
-        NewClustersRebootCallback.copy(DefaultTestCase.class.getResourceAsStream("data/com-sun-testmodule-cluster.nbm"), os2);
+        NewClustersRebootCallback.copy(DefaultTestCase.class.getResourceAsStream("data/com-example-testmodule-cluster.nbm"), os2);
         os2.close();
     }
 
@@ -75,11 +75,11 @@ public void testSelf() throws Exception {
     private File getNewCluster() throws IOException {
         return new File(getWorkDir(), NewClustersRebootCallback.NAME_OF_NEW_CLUSTER);
     }
-    
+
     private File getTestModule() throws IOException {
-        return new File(getNewCluster(),"modules"+File.separatorChar+"com-sun-testmodule-cluster.jar");
+        return new File(getNewCluster(),"modules"+File.separatorChar+"com-example-testmodule-cluster.jar");
     }
-    
+
     private void invokeNbExecAndCreateCluster(File workDir, StringBuffer sb, String... args) throws Exception {
         URL u = Lookup.class.getProtectionDomain().getCodeSource().getLocation();
         File f = Utilities.toFile(u.toURI());
@@ -91,7 +91,7 @@ private void invokeNbExecAndCreateCluster(File workDir, StringBuffer sb, String.
         URL tu = NewClustersRebootCallback.class.getProtectionDomain().getCodeSource().getLocation();
         File testf = Utilities.toFile(tu.toURI());
         assertTrue("file found: " + testf, testf.exists());
-                
+
         LinkedList<String> allArgs = new LinkedList<String>(Arrays.asList(args));
         allArgs.addFirst("-J-Dnetbeans.mainclass=" + NewClustersRebootCallback.class.getName());
         allArgs.addFirst(System.getProperty("java.home"));
@@ -160,7 +160,7 @@ public void run() {
 
         out.interrupt();
         err.interrupt();
-        
+
         LOG.info("Interrupting readers");
         out.join();
         err.join();
diff --git a/autoupdate.services/test/unit/src/org/netbeans/modules/autoupdate/services/UpdateDisabledModuleTestDisabled.java b/autoupdate.services/test/unit/src/org/netbeans/modules/autoupdate/services/UpdateDisabledModuleTest.java
similarity index 84%
rename from autoupdate.services/test/unit/src/org/netbeans/modules/autoupdate/services/UpdateDisabledModuleTestDisabled.java
rename to autoupdate.services/test/unit/src/org/netbeans/modules/autoupdate/services/UpdateDisabledModuleTest.java
index 6c4ed78ab..a95a7cf1f 100644
--- a/autoupdate.services/test/unit/src/org/netbeans/modules/autoupdate/services/UpdateDisabledModuleTestDisabled.java
+++ b/autoupdate.services/test/unit/src/org/netbeans/modules/autoupdate/services/UpdateDisabledModuleTest.java
@@ -51,11 +51,11 @@
  *
  * @author Jaroslav Tulach
  */
-public class UpdateDisabledModuleTestDisabled extends NbTestCase {
+public class UpdateDisabledModuleTest extends NbTestCase {
     static Manifest man;
     private File ud;
 
-    public UpdateDisabledModuleTestDisabled(String testName) {
+    public UpdateDisabledModuleTest(String testName) {
         super(testName);
     }
 
@@ -70,28 +70,28 @@ protected void setUp() throws Exception {
 
         man = new Manifest ();
         man.getMainAttributes ().putValue ("Manifest-Version", "1.0");
-        man.getMainAttributes ().putValue ("OpenIDE-Module", "com.sun.testmodule.cluster");
+        man.getMainAttributes ().putValue ("OpenIDE-Module", "com.example.testmodule.cluster");
         man.getMainAttributes ().putValue ("OpenIDE-Module-Public-Packages", "-");
-        
+
         ud = new File(getWorkDir(), "ud");
         System.setProperty("netbeans.user", ud.getPath());
         new File(ud, "config").mkdirs();
-        
+
         final File install = new File(getWorkDir(), "install");
         File platform = new File(install, "platform");
         System.setProperty("netbeans.home", platform.getPath());
         new File(platform, "config").mkdirs();
-        
+
         File middle = new File(install, "middle");
         File last = new File(install, "last");
         System.setProperty("netbeans.dirs", middle.getPath() + File.pathSeparator + last.getPath());
-        
+
         final String fn = moduleCodeNameBaseForTest().replace('.', '-') + ".xml";
         File conf = new File(new File(new File(middle, "config"), "Modules"), fn);
         conf.getParentFile().mkdirs();
         writeConfXML(conf, false);
 
-        final File jar = new File(new File(last, "modules"), "com-sun-testmodule-cluster.jar");
+        final File jar = new File(new File(last, "modules"), "com-example-testmodule-cluster.jar");
         jar.getParentFile().mkdirs();
         JarOutputStream os = new JarOutputStream(new FileOutputStream(jar), man);
         os.close();
@@ -99,42 +99,42 @@ protected void setUp() throws Exception {
         File real = new File(new File(new File(last, "config"), "Modules"), fn);
         real.getParentFile().mkdirs();
         writeConfXML(real, true);
-        
+
         FileUtil.getConfigRoot().getFileSystem().refresh(true);
-        
+
         File ut = new File(new File(last, "update_tracking"), fn);
         ut.getParentFile().mkdirs();
         OutputStream utos = new FileOutputStream(ut);
         String utcfg = "<?xml version='1.0' encoding='UTF-8'?>\n" +
-"<module codename=\"com.sun.testmodule.cluster\">\n" +
+"<module codename=\"com.example.testmodule.cluster\">\n" +
 "    <module_version install_time=\"1280356738644\" last=\"true\" origin=\"installer\" specification_version=\"0.99\">\n" +
-"        <file crc=\"3486416273\" name=\"config/Modules/com-sun-testmodule-cluster.xml\"/>\n" +
-"        <file crc=\"3486416273\" name=\"modules/com-sun-testmodule-cluster.jar\"/>\n" +
+"        <file crc=\"3486416273\" name=\"config/Modules/com-example-testmodule-cluster.xml\"/>\n" +
+"        <file crc=\"3486416273\" name=\"modules/com-example-testmodule-cluster.jar\"/>\n" +
 "    </module_version>\n" +
 "</module>\n";
         utos.write(utcfg.getBytes("UTF-8"));
         utos.close();
-        
+
         StringBuilder msg = new StringBuilder();
         for (ModuleInfo mi : Lookup.getDefault().lookupAll(ModuleInfo.class)) {
             msg.append(mi.getCodeNameBase()).append("\n");
-            if (mi.getCodeNameBase().equals("com.sun.testmodule.cluster")) {
+            if (mi.getCodeNameBase().equals("com.example.testmodule.cluster")) {
                 assertFalse("Disabled", mi.isEnabled());
                 return;
             }
         }
-        fail("No com.sun.testmodule.cluster module found:\n" + msg);
+        fail("No com.example.testmodule.cluster module found:\n" + msg);
     }
 
     private void writeConfXML(File conf, boolean enabled) throws FileNotFoundException, IOException {
         OutputStream os = new FileOutputStream(conf);
         String cfg = "<?xml version='1.0' encoding='UTF-8'?>\n" +
                 "<!DOCTYPE module PUBLIC '-//NetBeans//DTD Module Status 1.0//EN' 'http://www.netbeans.org/dtds/module-status-1_0.dtd'>\n" +
-                "<module name='com.sun.testmodule.cluster'>\n" +
+                "<module name='com.example.testmodule.cluster'>\n" +
                 "   <param name='autoload'>false</param>\n" +
                 "   <param name='eager'>false</param>\n" +
                 "   <param name='enabled'>" + enabled + "</param>\n" +
-                "   <param name='jar'>modules/com-sun-testmodule-cluster.jar</param>\n" +
+                "   <param name='jar'>modules/com-example-testmodule-cluster.jar</param>\n" +
                 "   <param name='reloadable'>false</param>\n" +
                 "   <param name='specversion'>1.0</param>\n" +
                 "</module>\n" +
@@ -144,18 +144,18 @@ private void writeConfXML(File conf, boolean enabled) throws FileNotFoundExcepti
     }
 
     String moduleCodeNameBaseForTest() {
-        return "com.sun.testmodule.cluster"; //NOI18N
+        return "com.example.testmodule.cluster"; //NOI18N
     }
 
     public void testSelf() throws Exception {
-        File f = new File(new File(new File(ud, "config"), "Modules"), "com-sun-testmodule-cluster.xml");
+        File f = new File(new File(new File(ud, "config"), "Modules"), "com-example-testmodule-cluster.xml");
         f.delete();
-        
+
         assertFalse("No Config file before: " + f, f.exists());
-        
+
         MockServices.setServices(UP.class);
         UpdateUnit update = UpdateManagerImpl.getInstance().getUpdateUnit(moduleCodeNameBaseForTest());
-        
+
         assertNotNull("There is an NBM to update", update);
         OperationContainer<InstallSupport> oc = OperationContainer.createForUpdate();
         oc.add(update, update.getAvailableUpdates().get(0));
@@ -169,7 +169,7 @@ public void testSelf() throws Exception {
 
         assertFalse("No Config file created in for upgrade: " + f, f.exists());
     }
-    
+
     public static final class UP implements UpdateProvider {
 
         @Override
@@ -195,14 +195,14 @@ public CATEGORY getCategory() {
         @Override
         public Map<String, UpdateItem> getUpdateItems() throws IOException {
             Map<String, UpdateItem> m = new HashMap<String, UpdateItem>();
-            m.put("com.sun.testmodule.cluster", UpdateItem.createModule(
-                "com.sun.testmodule.cluster", "1.0", 
-                DefaultTestCase.class.getResource("data/com-sun-testmodule-cluster.nbm"), 
-                "jarda", "4000", "http://netbeans.de", 
-                "2010/10/27", 
-                "OK", 
-                man, Boolean.TRUE, Boolean.FALSE, Boolean.TRUE, Boolean.TRUE, 
-                "platform", 
+            m.put("com.example.testmodule.cluster", UpdateItem.createModule(
+                "com.example.testmodule.cluster", "1.0",
+                DefaultTestCase.class.getResource("data/com-example-testmodule-cluster.nbm"),
+                "jarda", "4000", "http://netbeans.de",
+                "2010/10/27",
+                "OK",
+                man, Boolean.TRUE, Boolean.FALSE, Boolean.TRUE, Boolean.TRUE,
+                "platform",
                 UpdateLicense.createUpdateLicense("CDDL", "Free to use")
             ));
             return m;
@@ -212,6 +212,6 @@ public CATEGORY getCategory() {
         public boolean refresh(boolean force) throws IOException {
             return true;
         }
-        
+
     }
 }
diff --git a/autoupdate.services/test/unit/src/org/netbeans/modules/autoupdate/services/UpdateFromNbmTest.java b/autoupdate.services/test/unit/src/org/netbeans/modules/autoupdate/services/UpdateFromNbmTest.java
new file mode 100644
index 000000000..dc8b65002
--- /dev/null
+++ b/autoupdate.services/test/unit/src/org/netbeans/modules/autoupdate/services/UpdateFromNbmTest.java
@@ -0,0 +1,143 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.netbeans.modules.autoupdate.services;
+
+import java.io.File;
+import java.net.URL;
+import java.util.List;
+import java.util.Set;
+import org.netbeans.api.autoupdate.InstallSupport;
+import org.netbeans.api.autoupdate.OperationContainer;
+import org.netbeans.api.autoupdate.OperationException;
+import org.netbeans.api.autoupdate.OperationSupport.Restarter;
+import org.netbeans.api.autoupdate.TestUtils;
+import org.netbeans.api.autoupdate.TestUtils.CustomItemsProvider;
+import org.netbeans.api.autoupdate.UpdateElement;
+import org.netbeans.api.autoupdate.UpdateManager;
+import org.netbeans.api.autoupdate.UpdateUnit;
+import org.netbeans.api.autoupdate.UpdateUnitProviderFactory;
+import org.netbeans.junit.MockServices;
+
+/**
+ *
+ * @author Radek Matous
+ */
+public class UpdateFromNbmTest extends OperationsTestImpl {
+
+    public UpdateFromNbmTest(String testName) {
+        super(testName);
+    }
+
+    protected String moduleCodeNameBaseForTest() {
+        return "org.yourorghere.engine";
+    }
+
+    public void testSelf() throws Exception {
+        UpdateUnit toUpdate = UpdateManagerImpl.getInstance().getUpdateUnit(moduleCodeNameBaseForTest());
+        assertNotNull(toUpdate);
+        assertEquals(2, toUpdate.getAvailableUpdates ().size());
+        UpdateElement engine1_0 = toUpdate.getAvailableUpdates ().get (1);
+        assertNotNull(engine1_0);
+        assertEquals("1.0",engine1_0.getSpecificationVersion().toString());
+        installModule(toUpdate, engine1_0);
+        toUpdate = UpdateManagerImpl.getInstance().getUpdateUnit(moduleCodeNameBaseForTest());
+        assertNotNull(toUpdate.getInstalled());
+
+        MockServices.setServices(MyProvider.class, CustomItemsProvider.class);
+        URL engineURL = TestUtils.class.getResource("data/org-yourorghere-engine-1-2.nbm");
+        assertNotNull(engineURL);
+        File engineFile = TestUtils.getFile(this, engineURL);
+        assertTrue(engineFile.exists());
+
+        URL independentURL = TestUtils.class.getResource("data/org-yourorghere-independent-1-1.nbm");
+        assertNotNull(independentURL);
+        File independentFile = TestUtils.getFile(this, independentURL);
+        assertTrue(independentFile.exists());
+
+        String source = "local-downloaded";
+        List<UpdateUnit> units =  UpdateUnitProviderFactory.getDefault ().create (source, new File[] {engineFile, independentFile}).
+                getUpdateUnits (UpdateManager.TYPE.MODULE);
+        assertEquals(2, units.size());
+        UpdateUnit nbmsEngine =  null;
+        if (units.get(0).getCodeName().indexOf("engine") != -1) {
+            nbmsEngine = units.get (0);
+        } else if (units.get(1).getCodeName().indexOf("engine") != -1) {
+            nbmsEngine = units.get (1);
+        }
+        assertNotNull (nbmsEngine);
+        assertNotNull(nbmsEngine.getInstalled());
+        assertEquals(1, nbmsEngine.getAvailableUpdates().size());
+        UpdateElement engine1_2 = nbmsEngine.getAvailableUpdates().get(0);
+        assertEquals(source,engine1_2.getSource());
+        assertEquals("1.2",engine1_2.getSpecificationVersion().toString());
+        OperationContainer<InstallSupport> oc =  OperationContainer.createForUpdate();
+        OperationContainer.OperationInfo info = oc.add(nbmsEngine, engine1_2);
+        assertNotNull(info);
+        final Set brokeDeps = info.getBrokenDependencies();
+        assertEquals("One broken dep: " + brokeDeps, 1, brokeDeps.size());
+        String brokenDep = (String)brokeDeps.toArray()[0];
+        assertEquals("module org.yourorghere.independent > 1.1",brokenDep);
+        assertEquals(0, info.getRequiredElements().size());
+        UpdateUnit independentEngine =  null;
+        if (units.get(0).getCodeName().indexOf("independent") != -1) {
+            independentEngine = units.get (0);
+        } else if (units.get(1).getCodeName().indexOf("independent") != -1) {
+            independentEngine = units.get (1);
+        }
+        assertNotNull (independentEngine);
+        assertNotNull(independentEngine.getInstalled());
+
+        UpdateElement independent1_1 = independentEngine.getAvailableUpdates().get(0);
+        assertEquals(source,independent1_1.getSource());
+        assertEquals("1.1",independent1_1.getSpecificationVersion().toString());
+
+        OperationContainer.OperationInfo info2 = oc.add(independentEngine, independent1_1);
+        assertEquals(0, info.getBrokenDependencies().size());
+        assertEquals(0, info.getRequiredElements().size());
+        assertEquals(0, info2.getBrokenDependencies().size());
+        assertEquals(0, info2.getRequiredElements().size());
+
+        InstallSupport support = oc.getSupport();
+        assertNotNull(support);
+
+        InstallSupport.Validator v = support.doDownload(null, false);
+        assertNotNull(v);
+        InstallSupport.Installer i = support.doValidate(v, null);
+        assertNotNull(i);
+        //assertNotNull(support.getCertificate(i, upEl));
+        Restarter r = null;
+        try {
+            r = support.doInstall(i, null);
+        } catch (OperationException ex) {
+            if (OperationException.ERROR_TYPE.INSTALL == ex.getErrorType ()) {
+                // can ingore
+                // module system cannot load the module either
+            } else {
+                fail (ex.toString ());
+            }
+        }
+        assertNotNull ("Install update " + engine1_2 + " needs restart.", r);
+        support.doRestartLater (r);
+
+        MockServices.setServices(MyProvider.class, CustomItemsProvider.class);
+        assertTrue (nbmsEngine + " is waiting for Restart IDE.", nbmsEngine.isPending ());
+    }
+
+}
diff --git a/autoupdate.services/test/unit/src/org/netbeans/modules/autoupdate/services/UpdateUnitFactoryTest.java b/autoupdate.services/test/unit/src/org/netbeans/modules/autoupdate/services/UpdateUnitFactoryTest.java
new file mode 100644
index 000000000..8c1d50003
--- /dev/null
+++ b/autoupdate.services/test/unit/src/org/netbeans/modules/autoupdate/services/UpdateUnitFactoryTest.java
@@ -0,0 +1,188 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.netbeans.modules.autoupdate.services;
+
+import org.netbeans.modules.autoupdate.updateprovider.InstalledModuleProvider;
+import java.io.File;
+import java.io.IOException;
+import java.net.URISyntaxException;
+import java.net.URL;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import org.netbeans.api.autoupdate.TestUtils;
+import org.netbeans.api.autoupdate.UpdateElement;
+import org.netbeans.api.autoupdate.UpdateUnit;
+import org.netbeans.junit.NbTestCase;
+import org.netbeans.modules.autoupdate.updateprovider.AutoupdateCatalogProvider;
+import org.netbeans.modules.autoupdate.updateprovider.LocalNBMsProvider;
+import org.netbeans.spi.autoupdate.UpdateItem;
+import org.netbeans.spi.autoupdate.UpdateProvider;
+import org.openide.modules.ModuleInfo;
+import org.openide.util.Lookup;
+import org.openide.util.Utilities;
+
+/**
+ *
+ * @author Jiri Rechtacek
+ */
+public class UpdateUnitFactoryTest extends NbTestCase {
+
+    public UpdateUnitFactoryTest (String testName) {
+        super (testName);
+    }
+
+    private UpdateProvider p = null;
+    private static File NBM_FILE = null;
+
+    @Override
+    protected void setUp () throws IOException, URISyntaxException {
+        clearWorkDir ();
+        System.setProperty ("netbeans.user", getWorkDirPath ());
+        Lookup.getDefault ().lookup (ModuleInfo.class);
+        try {
+            p = new MyProvider ();
+        } catch (Exception x) {
+            x.printStackTrace ();
+        }
+        p.refresh (true);
+        URL urlToFile = TestUtils.class.getResource ("data/org-yourorghere-depending.nbm");
+        NBM_FILE = Utilities.toFile(urlToFile.toURI ());
+        assertNotNull ("data/org-yourorghere-depending.nbm file must found.", NBM_FILE);
+    }
+
+    public void testAppendInstalledModule () {
+        Map<String, UpdateUnit> unitImpls = new HashMap<String, UpdateUnit> ();
+        Map<String, ModuleInfo> modules = InstalledModuleProvider.getInstalledModules ();
+        assertNotNull ("Some modules are installed.", modules);
+        assertFalse ("Some modules are installed.", modules.isEmpty ());
+
+        Map<String, UpdateUnit> newImpls = UpdateUnitFactory.getDefault ().appendUpdateItems (
+                unitImpls,
+                InstalledModuleProvider.getDefault());
+        assertNotNull ("Some units found.", newImpls);
+        assertFalse ("Some units found.", newImpls.isEmpty ());
+
+        int modulesC = 0;
+        int features = 0;
+
+        for (UpdateUnit unit : newImpls.values ()) {
+            switch (unit.getType ()) {
+            case KIT_MODULE :
+                modulesC ++;
+                break;
+            case MODULE :
+                modulesC ++;
+                break;
+            case LOCALIZATION :
+            case FEATURE :
+                features ++;
+                break;
+            }
+        }
+        assertEquals ("Same size of installed modules and UpdateUnit (except FeatureElement).", modules.size (), modulesC);
+    }
+
+    public void testAppendUpdateItems () throws IOException {
+        Map<String, UpdateUnit> unitImpls = new HashMap<String, UpdateUnit> ();
+        Map<String, UpdateItem> updates = p.getUpdateItems ();
+        assertNotNull ("Some upadtes are present.", updates);
+        assertFalse ("Some upadtes are present.", updates.isEmpty ());
+
+        Map<String, UpdateUnit> newImpls = UpdateUnitFactory.getDefault ().appendUpdateItems (
+                unitImpls,
+                p);
+        assertNotNull ("Some units found.", newImpls);
+        assertFalse ("Some units found.", newImpls.isEmpty ());
+
+        int modules = 0;
+        int features = 0;
+        int kits = 0;
+        int installed = 0;
+
+        for (UpdateUnit unit : newImpls.values ()) {
+            switch (unit.getType ()) {
+            case MODULE :
+                modules ++;
+                if (unit.getInstalled () != null) {
+                    installed ++;
+                }
+                break;
+            case KIT_MODULE :
+                kits ++;
+                if (unit.getInstalled () != null) {
+                    installed ++;
+                }
+                break;
+            case LOCALIZATION :
+            case FEATURE :
+                features ++;
+                break;
+            }
+        }
+        assertEquals ("Same size of upadtes (modules + features) and UpdateUnit", updates.size () - installed, kits + modules + features);
+    }
+
+    public void testGroupInstalledAndUpdates () {
+        Map<String, UpdateUnit> unitImpls = new HashMap<String, UpdateUnit> ();
+        Map<String, UpdateUnit> installedImpls = UpdateUnitFactory.getDefault ().appendUpdateItems (
+                unitImpls,
+                InstalledModuleProvider.getDefault());
+        Map<String, UpdateUnit> updatedImpls = UpdateUnitFactory.getDefault ().appendUpdateItems (
+                installedImpls, p);
+        boolean isInstalledAndHasUpdates = false;
+        for (String id : updatedImpls.keySet ()) {
+            UpdateUnit impl = updatedImpls.get (id);
+            UpdateElement installed = impl.getInstalled ();
+            List<UpdateElement> updates = impl.getAvailableUpdates ();
+            isInstalledAndHasUpdates = isInstalledAndHasUpdates || installed != null && updates != null && ! updates.isEmpty ();
+            if (installed != null && updates != null && ! updates.isEmpty ()) {
+                assertTrue ("Updates of module " + id + " contain newer one.", updates.get (0).getSpecificationVersion ().compareTo (installed.getSpecificationVersion ()) > 0);
+            }
+        }
+        assertTrue ("Some module is installed and has updates.", isInstalledAndHasUpdates);
+    }
+
+    public void testGetUpdateUnitsInNbmFile () {
+        UpdateProvider localFilesProvider = new LocalNBMsProvider ("test-local-file-provider", NBM_FILE);
+        assertNotNull ("LocalNBMsProvider found for file " + NBM_FILE, localFilesProvider);
+        Map<String, UpdateUnit> units = UpdateUnitFactory.getDefault().getUpdateUnits (localFilesProvider);
+        assertNotNull ("UpdateUnit found in provider " + localFilesProvider.getDisplayName (), units);
+        assertEquals ("Provider providers only once unit in provider" + localFilesProvider.getName (), 1, units.size ());
+        String id = units.keySet ().iterator ().next ();
+        assertNotNull (localFilesProvider.getName () + " gives UpdateUnit.", units.get (id));
+        UpdateUnit u = units.get (id);
+        assertNull ("Unit is not installed.", u.getInstalled ());
+        assertNotNull ("Unit has update.", u.getAvailableUpdates ());
+        assertFalse ("Unit.getAvailableUpdates() is not empty.", u.getAvailableUpdates ().isEmpty ());
+        assertEquals ("Unit has only one update.", 1, u.getAvailableUpdates ().size ());
+        UpdateElement el = u.getAvailableUpdates ().get (0);
+        assertEquals ("org.yourorghere.depending", el.getCodeName ());
+        assertEquals ("1.0", el.getSpecificationVersion ());
+        assertEquals (0, el.getDownloadSize ());
+    }
+
+    public static class MyProvider extends AutoupdateCatalogProvider {
+        public MyProvider () {
+            super ("test-updates-provider", "test-updates-provider", TestUtils.class.getResource ("data/catalog.xml"));
+        }
+    }
+
+}
diff --git a/autoupdate.services/test/unit/src/org/netbeans/modules/autoupdate/services/VerifyFileTestDisabled.java b/autoupdate.services/test/unit/src/org/netbeans/modules/autoupdate/services/VerifyFileTest.java
similarity index 95%
rename from autoupdate.services/test/unit/src/org/netbeans/modules/autoupdate/services/VerifyFileTestDisabled.java
rename to autoupdate.services/test/unit/src/org/netbeans/modules/autoupdate/services/VerifyFileTest.java
index 49025c990..9b6da192d 100644
--- a/autoupdate.services/test/unit/src/org/netbeans/modules/autoupdate/services/VerifyFileTestDisabled.java
+++ b/autoupdate.services/test/unit/src/org/netbeans/modules/autoupdate/services/VerifyFileTest.java
@@ -34,25 +34,25 @@
 import org.netbeans.api.autoupdate.TestUtils;
 import org.netbeans.junit.NbTestCase;
 
-public class VerifyFileTestDisabled extends NbTestCase {
+public class VerifyFileTest extends NbTestCase {
 
-    private static final Logger LOG = Logger.getLogger(VerifyFileTestDisabled.class.getName());
+    private static final Logger LOG = Logger.getLogger(VerifyFileTest.class.getName());
 
     private KeyStore ks;
 
-    public VerifyFileTestDisabled(String testName) {
+    public VerifyFileTest(String testName) {
         super(testName);
     }
 
     @Override
     protected void setUp() throws Exception {
-        URL urlToKS = TestUtils.class.getResource("data/foo.jks");
+        URL urlToKS = TestUtils.class.getResource("data/test-keystore.jks");
         assertNotNull(urlToKS);
         File ksFile = org.openide.util.Utilities.toFile(urlToKS.toURI());
         assertTrue(ksFile.exists());
         ks = getKeyStore(ksFile, "password");
     }
-    
+
     private String doVerification(String path) throws URISyntaxException, IOException, KeyStoreException {
         URL urlToFile = TestUtils.class.getResource(path);
         assertNotNull(urlToFile);
@@ -62,7 +62,7 @@ private String doVerification(String path) throws URISyntaxException, IOExceptio
         Collection<Certificate> trustedCertificates = Utilities.getCertificates(ks);
         return Utilities.verifyCertificates(nbmCertificates, trustedCertificates);
     }
-    
+
     @SuppressWarnings("unchecked")
     public void testEmptyJar() throws MalformedURLException, URISyntaxException, IOException, KeyStoreException {
         assertEquals(Utilities.N_A, doVerification("data/empty.jar"));
diff --git a/autoupdate.services/test/unit/src/org/netbeans/modules/autoupdate/updateprovider/AutoupdateCatalogProviderTest.java b/autoupdate.services/test/unit/src/org/netbeans/modules/autoupdate/updateprovider/AutoupdateCatalogProviderTest.java
index d6d0814ba..a9c1dd912 100644
--- a/autoupdate.services/test/unit/src/org/netbeans/modules/autoupdate/updateprovider/AutoupdateCatalogProviderTest.java
+++ b/autoupdate.services/test/unit/src/org/netbeans/modules/autoupdate/updateprovider/AutoupdateCatalogProviderTest.java
@@ -41,7 +41,7 @@ protected void setUp() throws Exception {
     }
 
     public void testParseWrongXML() throws IOException {
-        URL u = getClass().getResource("malformed.xml");
+        URL u = AutoupdateCatalogProviderTest.class.getResource("data/malformed.xml");
         AutoupdateCatalogProvider acp = new AutoupdateCatalogProvider("broken", "really broken", u);
         acp.refresh(true);
         
diff --git a/autoupdate.services/test/unit/src/org/netbeans/modules/autoupdate/updateprovider/AutoupdateInfoParserTestDisabled.java b/autoupdate.services/test/unit/src/org/netbeans/modules/autoupdate/updateprovider/AutoupdateInfoParserTest.java
similarity index 90%
rename from autoupdate.services/test/unit/src/org/netbeans/modules/autoupdate/updateprovider/AutoupdateInfoParserTestDisabled.java
rename to autoupdate.services/test/unit/src/org/netbeans/modules/autoupdate/updateprovider/AutoupdateInfoParserTest.java
index ae12bccd6..a705ecae3 100644
--- a/autoupdate.services/test/unit/src/org/netbeans/modules/autoupdate/updateprovider/AutoupdateInfoParserTestDisabled.java
+++ b/autoupdate.services/test/unit/src/org/netbeans/modules/autoupdate/updateprovider/AutoupdateInfoParserTest.java
@@ -33,29 +33,29 @@
  *
  * @author Jiri Rechtacek
  */
-public class AutoupdateInfoParserTestDisabled extends DefaultTestCase {
-    
-    public AutoupdateInfoParserTestDisabled (String testName) {
+public class AutoupdateInfoParserTest extends DefaultTestCase {
+
+    public AutoupdateInfoParserTest (String testName) {
         super (testName);
     }
-    
+
     private static File NBM_FILE = null;
     private static final String LICENSE_NAME = "AD9FBBC9";
-    
+
     @Override
     protected void setUp() throws Exception {
         super.setUp();
-        URL urlToFile = AutoupdateInfoParserTestDisabled.class.getResource ("data/org-yourorghere-depending.nbm");
+        URL urlToFile = DefaultTestCase.class.getResource ("data/org-yourorghere-depending.nbm");
         NBM_FILE = Utilities.toFile(urlToFile.toURI ());
         assertNotNull ("data/org-yourorghere-depending.nbm file must found.", NBM_FILE);
     }
 
-    public void testGetItems () throws IOException, SAXException {        
+    public void testGetItems () throws IOException, SAXException {
         Map<String, UpdateItem> updateItems = AutoupdateInfoParser.getUpdateItems (NBM_FILE);
         assertNotNull ("UpdateItems found in " + NBM_FILE, updateItems);
         assertEquals ("Once item found.", 1, updateItems.keySet ().size ());
     }
-    
+
     public void testLicense () throws IOException, SAXException {
         Map<String, UpdateItem> updateItems = AutoupdateInfoParser.getUpdateItems (NBM_FILE);
         assertNotNull ("org.yourorghere.depending_1.0 in map", updateItems.get ("org.yourorghere.depending_1.0"));
@@ -66,5 +66,5 @@ public void testLicense () throws IOException, SAXException {
         assertNotNull (mi + " has license.", mi.getAgreement ());
         assertFalse (mi + " has non-empty license.", mi.getAgreement ().length () == 0);
     }
-    
+
 }
diff --git a/autoupdate.services/test/unit/src/org/netbeans/modules/autoupdate/updateprovider/malformed.xml b/autoupdate.services/test/unit/src/org/netbeans/modules/autoupdate/updateprovider/data/malformed.xml
similarity index 100%
rename from autoupdate.services/test/unit/src/org/netbeans/modules/autoupdate/updateprovider/malformed.xml
rename to autoupdate.services/test/unit/src/org/netbeans/modules/autoupdate/updateprovider/data/malformed.xml


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services