*/
ProtocolHashedVersion getServerVersion(WaveletName wavelet, WaveletDelta delta) {
if (delta.getTargetVersion().getVersion() == 0) {
return serialize(HASHER.createVersionZero(wavelet));
} else {
ProtocolHashedVersion current = versions.get(wavelet);
Preconditions.checkNotNull(current);
double prevVersion = current.getVersion();
double deltaVersion = delta.getTargetVersion().getVersion();
if (deltaVersion != prevVersion) {
throw new IllegalArgumentException(
"Client delta expressed against non-server version. Server version: " + prevVersion
+ ", client delta: " + deltaVersion);