public void clearData() {
    dataStore.clear();
  }
@Test
  void testClearData() {
    try {
      var dataMap = new HashMap<Integer, Data>();
      dataMap.put(1, data);
      var field = Shard.class.getDeclaredField("dataStore");
      field.setAccessible(true);
      field.set(shard, dataMap);
      shard.clearData();
      dataMap = (HashMap<Integer, Data>) field.get(shard);
      assertEquals(0, dataMap.size());
    } catch (NoSuchFieldException | IllegalAccessException e) {
      fail("Fail to modify field access.");
    }
  }