### Question:
WebjarsURLConnection extends URLConnection { @Override public InputStream getInputStream() throws IOException { try { final PipedOutputStream pipedOutputStream = new PipedOutputStream(); PipedInputStream pipedInputStream = new PipedInputStream( pipedOutputStream ); final URLConnection urlConnection = url.openConnection(); urlConnection.connect(); final InputStream originalInputStream = urlConnection.getInputStream(); transform_thread = EXECUTOR.submit( new WebjarsTransformer( url, originalInputStream, pipedOutputStream, this.minificationEnabled, this.automaticNonAmdShimConfigEnabled ) ); return pipedInputStream; } catch ( Exception e ) { logger.error( getURL().toString() + ": Error opening url" ); throw new IOException( "Error opening url", e ); } } WebjarsURLConnection( URL url );  WebjarsURLConnection( URL url, boolean minificationEnabled, boolean automaticNonAmdShimConfigEnabled ); @Override void connect(); @Override InputStream getInputStream();  }### Answer:
@Test public void testDisabledMinification() throws IOException { ZipFile zipInputStream = getDeployedJar( new URL( "mvn:org.webjars/smart-table/2.0.3-1" ), false ); ZipEntry entry = zipInputStream.getEntry( "OSGI-INF/blueprint/blueprint.xml" ); assertNotNull( entry ); String bpFile = IOUtils.toString( zipInputStream.getInputStream( entry ), "UTF-8" ); Pattern distPattern = Pattern.compile( "<service id=\"resourcesDist\".*>.*" + "<entry key=\"osgi\\.http\\.whiteboard\\.resource\\.pattern\" value=\"\\/smart-table@2.0.3-1\\/\\*\"\\/>.*" + "<entry key=\"osgi\\.http\\.whiteboard\\.resource\\.prefix\" value=\"\\/META-INF\\/resources\\/dist-gen\"\\/>.*" + "<\\/service>", Pattern.DOTALL ); Matcher matcher = distPattern.matcher( bpFile ); assertFalse( "blueprint.xml shouldn't include path for minified smart-table", matcher.find() ); distPattern = Pattern.compile( "<service id=\"resourcesSrc\".*>.*" + "<entry key=\"osgi\\.http\\.whiteboard\\.resource\\.pattern\" value=\"\\/webjar-src\\/smart-table@2.0.3-1\\/\\*\"\\/>.*" + "<entry key=\"osgi\\.http\\.whiteboard\\.resource\\.prefix\" value=\"\\/META-INF\\/resources\\/webjars\\/smart-table/2.0.3-1\"\\/>.*" + "<\\/service>", Pattern.DOTALL ); matcher = distPattern.matcher( bpFile ); assertFalse( "blueprint.xml shouldn't include path for smart-table sources", matcher.find() ); distPattern = Pattern.compile( "<service id=\"resourcesDist\".*>.*" + "<entry key=\"osgi\\.http\\.whiteboard\\.resource\\.pattern\" value=\"\\/smart-table@2.0.3-1\\/\\*\"\\/>.*" + "<entry key=\"osgi\\.http\\.whiteboard\\.resource\\.prefix\" value=\"\\/META-INF\\/resources\\/webjars\\/smart-table/2.0.3-1\"\\/>.*" + "<\\/service>", Pattern.DOTALL ); matcher = distPattern.matcher( bpFile ); assertTrue( "blueprint.xml should include path for original smart-table", matcher.find() ); entry = zipInputStream.getEntry( "META-INF/resources/dist-gen/smart-table.js" ); assertNull( entry ); entry = zipInputStream.getEntry( "META-INF/resources/webjars/smart-table/2.0.3-1/smart-table.js"); assertNotNull( entry ); }