IModel model = ... IChunk chunkToEncode = ... IDeclarativeModule decM = model.getDeclarativeModule(); Futureresult = decM.addChunk(chunkToEncode); IChunk encoded = result.get(); /* Merging might mean that the returned chunk is not the exact same reference, however, both IChunk objects will point to the same content */ boolean alwaysTrue = encoded.equalsSymbolic(chunkToEncode); boolean trueIfNotMerged = encoded == chunkToEncode;