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

    assertEquals(0, this.store.getStorefilesCount());

    // add some data, flush
    this.store.add(new KeyValue(row, family, qf1, 1, (byte[]) null), null);
    flush(1);
    // add one more file
    addStoreFile();

    StoreEngine<?, ?, ?, ?> spiedStoreEngine = spy(store.getStoreEngine());

    // call first time after files changed
    spiedStoreEngine.refreshStoreFiles();
    assertEquals(2, this.store.getStorefilesCount());
    verify(spiedStoreEngine, times(1)).replaceStoreFiles(any(), any(), any(), any());

    // call second time
    spiedStoreEngine.refreshStoreFiles();

    // ensure that replaceStoreFiles is not called, i.e, the times does not change, if files are not
    // refreshed,
    verify(spiedStoreEngine, times(1)).replaceStoreFiles(any(), any(), any(), any());
  }
Test for HBASE-3492 - Test split on empty colfam (no store files).
@throws IOException When the IO operations fail.
hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestHStore.java