DataServiceClient implements IDataServiceClientService { @Override public List<String> getServiceNames( String serviceName ) throws SQLException { return resolver.getDataServiceNames( serviceName ); } DataServiceClient( Query.Service queryService, DataServiceResolver resolver,
                            ExecutorService executorService ); @Override DataInputStream query( String sqlQuery, final int maxRows ); @Override DataInputStream query( String sqlQuery, final int maxRows,
                                          Map<String, String> params ); @Override DataInputStream query( String sqlQuery, IDataServiceClientService.StreamingMode windowMode,
                                          long windowSize, long windowEvery,
                                          long windowLimit ); @Override DataInputStream query( String sqlQuery, IDataServiceClientService.StreamingMode windowMode,
                                          long windowSize, long windowEvery,
                                          long windowLimit, Map<String, String> params ); Query prepareQuery( String sql, int maxRows, Map<String, String> parameters ); Query prepareQuery( String sql, IDataServiceClientService.StreamingMode windowMode,
                             long windowSize, long windowEvery, long windowLimit, Map<String, String> parameters ); @Override List<IThinServiceInformation> getServiceInformation(); @Override ThinServiceInformation getServiceInformation( String name ); @Override List<String> getServiceNames( String serviceName ); @Override List<String> getServiceNames(); List<DataServiceMeta> getServiceMeta(); DataServiceMeta getServiceMeta( String serviceName ); void setLogChannel( LogChannelInterface log ); LogChannelInterface getLogChannel(); @Deprecated void setRepository( Repository repository ); @Deprecated void setMetaStore( IMetaStore metaStore ); @Override void query( String sqlQuery, IStreamingParams streamParams,
                     Map<String, String> params, Observer<List<RowMetaAndData>> consumer );  }
@Test public void testServiceNameResolution() throws Exception { when( dataServiceResolver.getDataServiceNames() ).thenReturn( ImmutableList.of( "A", "B" ) ); when( dataServiceResolver.getDataServiceNames( "A" ) ).thenReturn( ImmutableList.of( "A" ) ); assertThat( client.getServiceNames(), contains( "A", "B" ) ); assertThat( client.getServiceNames( "A" ), contains( "A" ) ); }