@Test
  public void testGet_FromMemStoreAndFiles() throws IOException {
    init(this.name.getMethodName());

    // Put data in memstore
    this.store.add(new KeyValue(row, family, qf1, 1, (byte[]) null), null);
    this.store.add(new KeyValue(row, family, qf2, 1, (byte[]) null), null);
    // flush
    flush(1);

    // Add more data
    this.store.add(new KeyValue(row, family, qf3, 1, (byte[]) null), null);
    this.store.add(new KeyValue(row, family, qf4, 1, (byte[]) null), null);
    // flush
    flush(2);

    // Add more data
    this.store.add(new KeyValue(row, family, qf5, 1, (byte[]) null), null);
    this.store.add(new KeyValue(row, family, qf6, 1, (byte[]) null), null);

    // Get
    result = HBaseTestingUtil.getFromStoreFile(store, get.getRow(), qualifiers);

    // Need to sort the result since multiple files
    Collections.sort(result, CellComparatorImpl.COMPARATOR);

    // Compare
    assertCheck();
  }
Getting data from memstore and files
hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestHStore.java