### Question:
RequireJsGenerator { public static RequireJsGenerator processJsScript( String moduleName, String moduleVersion, InputStream inputStream ) throws Exception { try { byte[] bytes = IOUtils.toByteArray( inputStream ); return new RequireJsGenerator( moduleName, moduleVersion, new String( bytes, "UTF-8" ) ); } catch ( Exception e ) { throw new Exception( "Error reading JS script", e ); } } private  RequireJsGenerator( Document pom ); private  RequireJsGenerator( String moduleName, String moduleVersion, String jsScript ); private  RequireJsGenerator( Map<String, Object> json ); private  RequireJsGenerator( String moduleName, String moduleVersion ); static RequireJsGenerator parsePom( InputStream inputStream ); static RequireJsGenerator processJsScript( String moduleName, String moduleVersion, InputStream inputStream ); static RequireJsGenerator parseJsonPackage( InputStream inputStream ); static RequireJsGenerator emptyGenerator( String physicalPathNamePart, String physicalPathVersionPart ); static String getWebjarVersionFromPom( InputStream inputStream ); static Map<String, Object> getPackageOverrides( String group, String artifactId, String version ); static boolean findAmdDefine( InputStream is, ArrayList<String> exports ); ModuleInfo getModuleInfo(); ModuleInfo getConvertedConfig( ArtifactInfo artifactInfo, boolean isAmdPackage, String exports, Map<String, Object> overrides );  }### Answer:
@Test public void testConfigFromJsScript() throws Exception { String name = "angularjs"; String version = "1.3.0-rc.0"; RequireJsGenerator moduleInfo = RequireJsGenerator .processJsScript( name, version, getResourceAsStream( WEBJARS_REQUIREJS_JS ) ); RequireJsGenerator.ArtifactInfo artifactInfo = new RequireJsGenerator .ArtifactInfo( "org.webjars", name, version ); assertEquals( getExpectedOutput( WEBJARS_REQUIREJS_JSON ), getRequireJsConfig( moduleInfo, artifactInfo ) ); }