@Test
public void testSplitQuery(){

    AnnotationQuery annotationQuery = new AnnotationQuery("scope1", "metric1", null, "unittest", 1559153223000L, 1559153226000L);
    List<AnnotationQuery> queries = dualAnnotationService.splitQuery(annotationQuery);
    assertEquals(2, queries.size());
    AnnotationQuery tsdbQuery = queries.get(0);
    AnnotationQuery esQuery = queries.get(1);
    assertEquals("scope1", tsdbQuery.getScope());
    assertEquals("metric1", tsdbQuery.getMetric());
    assertEquals("unittest", tsdbQuery.getType());
    assertEquals(1559153223000L, tsdbQuery.getStartTimestamp().longValue());
    assertEquals(1559153225000L, tsdbQuery.getEndTimestamp().longValue());
    
    assertEquals("scope1", esQuery.getScope());
    assertEquals("metric1", esQuery.getMetric());
    assertEquals("unittest", esQuery.getType());
    assertEquals(1559153225000L, esQuery.getStartTimestamp().longValue());
    assertEquals(1559153226000L, esQuery.getEndTimestamp().longValue());
}