DataServiceResolverDelegate implements DataServiceResolver { @Override public List<DataServiceMeta> getDataServices( Function<Exception, Void> logger ) { List<DataServiceMeta> dataServiceMetas = new ArrayList<>(); for ( DataServiceResolver resolver : resolvers ) { dataServiceMetas.addAll( resolver.getDataServices( logger ) ); } return dataServiceMetas; } DataServiceResolverDelegate();  DataServiceResolverDelegate( List<DataServiceResolver> resolvers ); void addResolver( DataServiceResolver resolver ); void removeResolver( DataServiceResolver resolver ); @Override List<DataServiceMeta> getDataServices( Function<Exception, Void> logger ); @Override List<DataServiceMeta> getDataServices( String dataServiceName, Function<Exception, Void> logger ); @Override DataServiceMeta getDataService( String dataServiceName ); @Override List<String> getDataServiceNames( String dataServiceName ); @Override DataServiceExecutor.Builder createBuilder( SQL sql ); @Override List<String> getDataServiceNames();  }
@Test public void testGetDataServicesWithFunction() { List<DataServiceMeta> lDataServiceMeta = dataServiceResolverDelegate.getDataServices( logger ); assertTrue( lDataServiceMeta.size() == 1 ); verify( resolver ).getDataServices( logger ); }
@Test public void testGetDataServicesWithName() { List<DataServiceMeta> lDataServiceMeta = dataServiceResolverDelegate.getDataServices( DATA_SERVICE_NAME, logger ); assertTrue( lDataServiceMeta.size() == 1 ); verify( resolver ).getDataServices( DATA_SERVICE_NAME, logger ); }