@Test
public void testRefresh() throws Exception {

  final MutableBoolean initialized = new MutableBoolean(false);
  Runnable initializer = new Runnable() {
    @Override
    public void run() {
      try {
        model.getNumUsers();
        initialized.setValue(true);
      } catch (TasteException te) {
        // oops
      }
    }
  };
  new Thread(initializer).start();
  Thread.sleep(1000L); // wait a second for thread to start and call getNumUsers()
  model.getNumUsers(); // should block
  assertTrue(initialized.booleanValue());
  assertEquals(4, model.getNumUsers());
}