/wro4j-maven-plugin/src/main/java/ro/isdc/wro/maven/plugin/Wro4jMojo.java
resultInputStream = new UnclosableBufferedInputStream( resultOutputStream.ByteArrayOutputStream( ) ) ;
resultInputStream = new UnclosableBufferedInputStream ( resultOutputStream.toByteArray ( ) ) ;
Mockito.when(response.getOutputStream()).thenReturn(new DelegatingServletOutputStream(resultOutputStream)); final WroConfiguration config = Context.get().getConfig(); config.setIgnoreEmptyGroup(true); Context.set(Context.webContext(request, response, Mockito.mock(FilterConfig.class)), config); Context.get().setAggregatedFolderPath(getAggregatedPathResolver().resolve()); getManagerFactory().create().process(); <extra_id_0> final File destinationFile = new File(parentFoder, rename(group, resultInputStream)); final File parentFolder = destinationFile.getParentFile(); if (!parentFolder.exists()) { parentFolder.mkdirs(); } destinationFile.createNewFile();