/** Fakes a service call, using the WorkManager for threading. */ private void fakeServiceCall() { poller.enablePoll(); Cache.getCache().invalidate(DATA_KEY); new Thread() { @Override public void run() { try { Thread.sleep(SERVICE_TIME); Cache.getCache().put(DATA_KEY, "SUCCESS!"); } catch (InterruptedException e) { LOG.error("Timed out calling service", e); Cache.getCache().put(DATA_KEY, "Timed out!"); } } }.start(); }