     constructor: ->
       @fheEngine      = new MockFheEngine()
       @indexGenerator = new RandomIndexGenerator()
+      @hashFunction   = HashFunction.MURMUR3_128
 
     mapToKeys: ({ metadata, documentKey }) ->
       metadataMap  = {}

define 'kryptnostic.search.metadata-mapper', [
  'require'
  'kryptnostic.hash-function'
  'kryptnostic.mock.fhe-engine'
  'kryptnostic.search.random-index-generator'
], (require) ->

  HashFunction         = require 'kryptnostic.hash-function'
  MockFheEngine        = require 'kryptnostic.mock.fhe-engine'
  RandomIndexGenerator = require 'kryptnostic.search.random-index-generator'

  MINIMUM_TOKEN_LENGTH = 1

  #
  # compute size of largest metadata bucket for padding.

    subListAndPad : (locations, desiredLength) ->
      padCount     = desiredLength - locations.length
      falseIndices = @indexGenerator.generate(padCount)
      return locations.concat(falseIndices)

  return MetadataMapper
