@Override
  public int storeData(Data data) {
    var shardId = allocateShard(data);
    lookupMap.put(data.getKey(), shardId);
    var shard = shardMap.get(shardId);
    shard.storeData(data);
    LOGGER.info(data + " is stored in Shard " + shardId);
    return shardId;
  }
@Test
  void testStoreData() {
    try {
      var data = new Data(1, "test", Data.DataType.TYPE_1);
      lookupShardManager.storeData(data);
      var field = LookupShardManager.class.getDeclaredField("lookupMap");
      field.setAccessible(true);
      var lookupMap = (Map<Integer, Integer>) field.get(lookupShardManager);
      var shardId = lookupMap.get(1);
      var shard = lookupShardManager.getShardById(shardId);
      assertEquals(data, shard.getDataById(1));
    } catch (NoSuchFieldException | IllegalAccessException e) {
      fail("Fail to modify field access.");
    }
  }