#include "zbxmockassert.h"
#include "valuecache_mock.h"
#include "zbxcachevalue.h"
#include "zbxcacheconfig.h"
#include "zbx_dbversion_constants.h"
static zbx_vcmock_ds_t vc_ds;
static zbx_timespec_t vcmock_ts;
int __wrap_zbx_mutex_create(zbx_mutex_t *mutex, zbx_mutex_name_t name, char **error);
void __wrap_zbx_mutex_destroy(zbx_mutex_t *mutex);
int __wrap_zbx_shmem_create(zbx_shmem_info_t **info, zbx_uint64_t size, const char *descr, const char *param,
int allow_oom, char **error);
void __wrap_zbx_shmem_destroy(zbx_shmem_info_t *info);
void *__wrap___zbx_shmem_malloc(const char *file, int line, zbx_shmem_info_t *info, const void *old, size_t size);
void *__wrap___zbx_shmem_realloc(const char *file, int line, zbx_shmem_info_t *info, void *old, size_t size);
void __wrap___zbx_shmem_free(const char *file, int line, zbx_shmem_info_t *info, void *ptr);
void __wrap_zbx_shmem_dump_stats(int level, zbx_shmem_info_t *info);
int __wrap_zbx_history_get_values(zbx_uint64_t itemid, int value_type, int start, int count, int end,
zbx_vector_history_record_t *values);
int __wrap_zbx_history_add_values(const zbx_vector_ptr_t *history);
void __wrap_zbx_history_sql_init(zbx_history_iface_t *hist, unsigned char value_type);
int __wrap_zbx_history_elastic_init(zbx_history_iface_t *hist, unsigned char value_type, int config_log_slow_queries, char **error);
void __wrap_zbx_elastic_version_extract(void);
int __wrap_zbx_elastic_version_get(void);
time_t __wrap_time(time_t *ptr);
void __wrap_zbx_timespec(zbx_timespec_t *ts);
void zbx_vc_set_mode(int mode);
static int history_compare(const void *d1, const void *d2)