/wro4j-maven-plugin/src/main/java/ro/isdc/wro/maven/plugin/Wro4jMojo.java
getTaskExecutor( ).create( ).process( ) ;
getManagerFactory ( ) .create ( ) .process ( ) ;
resultOutputStream = new ByteArrayOutputStream(); 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()); <extra_id_0> resultInputStream = new UnclosableBufferedInputStream(resultOutputStream.toByteArray()); final File destinationFile = new File(parentFoder, rename(group, resultInputStream)); final File parentFolder = destinationFile.getParentFile(); if (!parentFolder.exists()) { parentFolder.mkdirs(); }