@Test
public void testHashedSearchIdentifierAnnotationAndAnnotationQueryMatch(){

    Map<String, String> annotationQueryTags = new HashMap<>();
    annotationQueryTags.put("device","device1");
    annotationQueryTags.put("podName","pod1");
    AnnotationQuery annotationQuery = new AnnotationQuery("scope1", "metric1", annotationQueryTags, "transactionId", 1557809359073L, 1557809599073L);
    Annotation annotation = new Annotation("source", "16ab4b56311", "transactionId", "scope1", "metric1", 1557809559073L);
    annotation.setTags(annotationQueryTags);
    assertEquals(AnnotationRecordList.getHashedSearchIdentifier(annotation), ElasticSearchAnnotationService.getHashedSearchIdentifier(annotationQuery));
    // change order of tags in annotation query
    Map<String, String> annotationQueryTags2 = new HashMap<>();
    annotationQueryTags2.put("podName","pod1");
    annotationQueryTags2.put("device","device1");
    AnnotationQuery annotationQuery2 = new AnnotationQuery("scope1", "metric1", annotationQueryTags2, "transactionId", 1557809359073L, 1557809599073L);
    assertEquals(AnnotationRecordList.getHashedSearchIdentifier(annotation), ElasticSearchAnnotationService.getHashedSearchIdentifier(annotationQuery2));
}