ConfigurationService { public T retrieve() { synchronized (dataLock) { if (data == null) { data = load(); } return data; } } ConfigurationService(PersistenceService<T> persistenceService, EntityEventSupport eventSupport); T retrieve(); void update(T value);  }
@Test public void retrieve() { assertSame(data, configurationService.retrieve()); assertSame(data, configurationService.retrieve()); verifyNoMoreInteractions(eventSupport); }