ConfigurationService { protected void clearState() { synchronized (dataLock) { data = null; } } ConfigurationService(PersistenceService<T> persistenceService, EntityEventSupport eventSupport); T retrieve(); void update(T value);  }
@Test public void clearState() { assertSame(data, configurationService.retrieve()); configurationService.clearState(); data = new TestConfig("b"); doReturn(data).when(persistenceService).load(); assertSame(data, configurationService.retrieve()); }