@Override
  public PageStoreDir allocate(String fileId, long fileLength) {
    return mDirs.get(
        Math.floorMod(mHashFunction.apply(fileId),
            mDirs.size()));
  }
@Test
  public void basicHashTest() {
    mAllocator = new HashAllocator(mDirs, Integer::parseInt);
    assertEquals("/1", mAllocator.allocate("0", 0).getRootPath().toString());
    assertEquals("/2", mAllocator.allocate("1", 0).getRootPath().toString());
    assertEquals("/3", mAllocator.allocate("2", 0).getRootPath().toString());
    assertEquals("/1", mAllocator.allocate("3", 0).getRootPath().toString());
  }