EventPublishingDataStore implements DataStore<K, E>, DataStoreEventPublisher { @Override public Class<E> getEntityType() { return delegate.getEntityType(); } EventPublishingDataStore(DataStore<K, E> delegate, RepositoryMetadata repositoryMetadata,
                                    DataStoreEventListenerContext listenerContext); @Override boolean hasKey(K key); @Override boolean save(K key, E entity); @Override boolean delete(K key); @Override E retrieve(K key); @Override Collection<K> keys(); @Override Collection<E> retrieveAll(); @Override Class<E> getEntityType(); @Override void truncate(); @Override void publishEvent(DataStoreEvent event);  }
@Test public void testEntityTypeDelegation() { assertThat(dataStore.getEntityType(), Matchers.<Class<Person>>is(delegate.getEntityType())); }