DataServiceFactory extends DataServiceMetaStoreUtil { public abstract Repository getRepository(); protected  DataServiceFactory( DataServiceContext context ); abstract Repository getRepository(); IMetaStore getMetaStore(); DataServiceMeta getDataService( String serviceName ); Iterable<DataServiceMeta> getDataServices( Function<Exception, Void> exceptionHandler ); List<String> getDataServiceNames(); DataServiceExecutor.Builder createBuilder( SQL sql );  }
@Test public void testCreateClient() throws Exception { when( repositoryLocator.getRepository() ).thenReturn( repository ); DataServiceResolver dataServiceResolver = new MetaStoreResolver( repositoryLocator, context ); DataServiceClient client = new DataServiceClient( queryService, dataServiceResolver, Executors.newCachedThreadPool() ); metaStoreUtil.save( dataService ); metaStoreUtil.sync( transMeta, exceptionHandler ); assertThat( client.getServiceInformation(), contains( hasProperty( "name", equalTo( DATA_SERVICE_NAME ) ) ) ); }