visualweb.insync/test/unit/src/org/netbeans/modules/visualweb/insync/InsyncTestBase.java
1.1 --- a/visualweb.insync/test/unit/src/org/netbeans/modules/visualweb/insync/InsyncTestBase.java Mon May 17 14:20:06 2010 -0400
1.2 +++ b/visualweb.insync/test/unit/src/org/netbeans/modules/visualweb/insync/InsyncTestBase.java Wed Mar 23 16:50:27 2011 -0400
1.3 @@ -40,10 +40,9 @@
1.4 import java.util.ArrayList;
1.5 import java.util.List;
1.6 import java.util.regex.Pattern;
1.7 -import junit.framework.*;
1.8 import org.netbeans.api.project.Project;
1.9 import org.netbeans.api.project.libraries.LibraryManager;
1.10 -import org.netbeans.core.startup.layers.NbinstURLStreamHandlerFactory;
1.11 +import org.netbeans.junit.MockServices;
1.12 import org.netbeans.junit.NbTestCase;
1.13 import org.netbeans.modules.visualweb.insync.beans.Bean;
1.14 import org.netbeans.modules.visualweb.insync.beans.BeansUnit;
1.15 @@ -52,7 +51,7 @@
1.16 import org.netbeans.modules.web.project.WebProject;
1.17 import org.openide.filesystems.FileObject;
1.18 import org.openide.util.Exceptions;
1.19 -import org.openide.util.test.MockLookup;
1.20 +import org.openide.util.Lookup;
1.21
1.22 /**
1.23 *
1.24 @@ -283,12 +282,7 @@
1.25 }
1.26
1.27 private static void setupServices() {
1.28 - URLStreamHandlerFactory urlStreamHandlerFactory = new NbinstURLStreamHandlerFactory();
1.29 - URL.setURLStreamHandlerFactory(urlStreamHandlerFactory);
1.30 - MockLookup.setInstances(
1.31 - new RepositoryImpl(),
1.32 - new InsyncMimeResolver(),
1.33 - urlStreamHandlerFactory
1.34 - );
1.35 + URL.setURLStreamHandlerFactory(Lookup.getDefault().lookup(URLStreamHandlerFactory.class));
1.36 + MockServices.setServices(RepositoryImpl.class, InsyncMimeResolver.class);
1.37 }
1.38 }