### Question:
MetaInfRequireJson implements IRequireJsPackage { @Override public boolean preferGlobal() { return this.name.isEmpty(); } MetaInfRequireJson( Map<String, Object> requireJsonObject ); @Override String getName(); @Override String getVersion(); @Override String getWebRootPath(); @Override boolean preferGlobal(); @Override Map<String, String> getModules(); @Override String getModuleMainFile( String moduleId ); @Override Map<String, String> getDependencies(); @Override boolean hasScript( String name ); URL getScriptResource( String name ); @Override Map<String, Map<String, ?>> getConfig(); @Override Map<String, Map<String, String>> getMap(); @Override Map<String, Map<String, ?>> getShim(); boolean isAmdPackage(); String getExports();  }### Answer:
@Test public void preferGlobal() { MetaInfRequireJson requireJson = new MetaInfRequireJson( requireMeta ); assertEquals( false, requireJson.preferGlobal() ); }
@Test public void preferGlobalNoNAme() { final Map<String, Map<String, Map<String, Map<String, Object>>>> meta = (Map<String, Map<String, Map<String, Map<String, Object>>>>) requireMeta.get( "requirejs-osgi-meta" ); meta.remove( "artifacts" ); meta.remove( "modules" ); MetaInfRequireJson requireJson = new MetaInfRequireJson( requireMeta ); assertEquals( true, requireJson.preferGlobal() ); }