@Override
  public void addEntry( String filename, String extension ) throws IOException {
    // remove folder hierarchy
    int index = filename.lastIndexOf( Const.FILE_SEPARATOR );
    String entryPath;
    if ( index != -1 ) {
      entryPath = filename.substring( index + 1 );
    } else {
      entryPath = filename;
    }

    // remove ZIP extension
    index = entryPath.toLowerCase().lastIndexOf( ".zip" );
    if ( index != -1 ) {
      entryPath = entryPath.substring( 0, index ) + entryPath.substring( index + ".zip".length() );
    }

    // add real extension if needed
    if ( !Utils.isEmpty( extension ) ) {
      entryPath += "." + extension;
    }

    ZipEntry zipentry = new ZipEntry( entryPath );
    zipentry.setComment( "Compressed by Kettle" );
    ( (ZipOutputStream) delegate ).putNextEntry( zipentry );
  }
@Test
  public void testAddEntryAndWrite() throws IOException {
    CompressionProvider provider = outStream.getCompressionProvider();
    ByteArrayOutputStream out = new ByteArrayOutputStream();
    outStream = new ZIPCompressionOutputStream( out, provider );
    outStream.addEntry( "./test.zip", null );
    outStream.write( "Test".getBytes() );
  }