@Test
public void testSearchSpecificCuboid() throws Exception {

    StreamingQueryProfile profile = new StreamingQueryProfile("test-query-id", System.currentTimeMillis());
    StreamingQueryProfile.set(profile);
    setBuildAdditionalCuboids();
    int eventCnt = 50000;
    prepareDataToMemoryStore(eventCnt);
    Set<TblColRef> dimensions = simulateColumns("SITE");
    Set<TblColRef> groups = Sets.newHashSet();
    Set<FunctionDesc> metrics = simulateMetrics();
    StreamingSearchContext searchRequest = new StreamingSearchContext(cubeDesc, dimensions, groups, metrics,
            null, null);
    assertEquals(1L, searchRequest.getHitCuboid());
    ResultCollector resultCollector = new SingleThreadResultCollector();
    memoryStore.search(searchRequest, resultCollector);
    int returnRecordCnt = 0;
    int returnColNum = 0;
    for (Record record : resultCollector) {
        returnRecordCnt++;
        returnColNum = record.getDimensions().length + record.getMetrics().length;
    }
    assertEquals(10, returnRecordCnt);
    assertEquals(2, returnColNum);
}