public void finishRefresh() {
    if (lazyLoaded.get() == null) {
      throw new IllegalStateException(
          "Cannot finish refresh - call lazyRefresh() first");
    }
    current.set(lazyLoaded.get());
    lazyLoaded.set(null);
  }
@Test(expected = IllegalStateException.class)
  public void testFinishRefreshWithoutLazyRefresh() throws IOException {
    FileWriter efw = new FileWriter(excludesFile);
    FileWriter ifw = new FileWriter(includesFile);
    efw.close();
    ifw.close();

    HostsFileReader hfp = new HostsFileReader(includesFile, excludesFile);
    hfp.finishRefresh();
  }