byte[] dictBytes = dict == null ? null : dict.getBytes("UTF-8");
VerboseStringCompressionModel model = new VerboseStringCompressionModel();
model.setDictionary(dictBytes);
byte[] compressed = model.compress(bytes);
byte[] decompressed = model.decompress(compressed);
Assert.assertEquals("Compressed: " + (new String(compressed, "UTF-8")), s, new String(decompressed, "UTF-8"));
return new String(compressed, "UTF-8");
}