code: @Nonnull
    @VisibleForTesting
    SnapshotCodec getCodecForVersion(int version) {
      SnapshotCodec codec = codecs.get(version);
      if (codec == null) {
        throw new IllegalArgumentException(String.format("Version %d of snapshot encoding is not supported", version));
      }
      return codec;
    }
docs: Retrieve the codec for a particular version of the encoding.
  @param version the version of interest
  @return the corresponding codec
  @throws java.lang.IllegalArgumentException if the version is not known