@Test
public void testQueryStoreRecordListMapper() throws Exception {

    ObjectMapper mapper = ElasticSearchQueryStoreService.getQueryStoreObjectMapper(new QueryStoreRecordList.IndexSerializer());
    QueryStoreRecord record1 = new QueryStoreRecord("scope1", "metric1");
    QueryStoreRecordList recordList = new QueryStoreRecordList(new HashSet<>(Arrays.asList(record1)), QueryStoreRecordList.HashAlgorithm.fromString("MD5"));
    String serialized = mapper.writeValueAsString(recordList);
    assertTrue("expect the serialized record to have scope", serialized.contains("scope1"));
    assertTrue("expect the serialized record to have metric", serialized.contains("metric1"));
}