TEST_F(ZstdDecompressorImplTest, WrongInput) {
  Buffer::OwnedImpl buffer;
  Buffer::OwnedImpl output_buffer;
  const char zeros[20]{};

  Buffer::BufferFragmentImpl* frag = new Buffer::BufferFragmentImpl(
      zeros, 20, [](const void*, size_t, const Buffer::BufferFragmentImpl* frag) { delete frag; });
  buffer.addBufferFragment(*frag);
  Stats::IsolatedStoreImpl stats_store{};
  ZstdDecompressorImpl decompressor{stats_store, "test.", default_ddict_manager_, 16};
  decompressor.decompress(buffer, output_buffer);
  EXPECT_EQ(1, stats_store.counterFromString("test.zstd_generic_error").value());
}
TEST_F(ZstdDecompressorImplTest, WrongInput) {
  Buffer::OwnedImpl buffer;
  Buffer::OwnedImpl output_buffer;
  const char zeros[20]{};

  Buffer::BufferFragmentImpl* frag = new Buffer::BufferFragmentImpl(
      zeros, 20, [](const void*, size_t, const Buffer::BufferFragmentImpl* frag) { delete frag; });
  buffer.addBufferFragment(*frag);
  Stats::IsolatedStoreImpl stats_store{};
  ZstdDecompressorImpl decompressor{stats_store, "test.", default_ddict_manager_, 16};
  decompressor.decompress(buffer, output_buffer);
  EXPECT_EQ(1, stats_store.counterFromString("test.zstd_generic_error").value());
}