ProviderBasedDataObjectService implements DataObjectService { @Override public MetadataRepository getMetadataRepository() { return metadataRepository; }  @Override T find(Class<T> type, Object id); @Override QueryResults<T> findMatching(Class<T> type, QueryByCriteria queryByCriteria); @Override QueryResults<T> findAll(Class<T> type); @Override T findUnique(Class<T> type, QueryByCriteria queryByCriteria); @Override void delete(Object dataObject); @Override void deleteMatching(Class<T> type, QueryByCriteria queryByCriteria); @Override void deleteAll(Class<T> type); @Override T save(T dataObject, PersistenceOption... options); @Override MetadataRepository getMetadataRepository(); @Override T copyInstance(T dataObject, CopyOption... options); @Override DataObjectWrapper<T> wrap(T dataObject); @Override boolean supports(Class<T> type); @Override void flush(Class<?> type); @Required void setProviderRegistry(ProviderRegistry providerRegistry); @Required void setMetadataRepository(MetadataRepository metadataRepository); ReferenceLinker getReferenceLinker(); @Required void setReferenceLinker(ReferenceLinker referenceLinker);  }
@Test public void testGetMetadataRepository() { assertSame(metadataRepository, service.getMetadataRepository()); }