ExecutorQueryService implements Query.Service { public static DataOutputStream asDataOutputStream( OutputStream outputStream ) { return outputStream instanceof DataOutputStream ? ( (DataOutputStream) outputStream ) : new DataOutputStream( outputStream ); } ExecutorQueryService( DataServiceResolver resolver, MetastoreLocator metastoreLocator ); @Override Query prepareQuery( String sqlString, int maxRows, Map<String, String> parameters ); @Override Query prepareQuery( String sqlString, IDataServiceClientService.StreamingMode windowMode,
                                       long windowSize, long windowEvery, long windowLimit,
                                       final Map<String, String> parameters ); static DataOutputStream asDataOutputStream( OutputStream outputStream );  }
@Test public void testAsDataOutputStream() throws IOException { assertSame( dataOutputStream, ExecutorQueryService.asDataOutputStream( dataOutputStream ) ); DataOutputStream out = ExecutorQueryService.asDataOutputStream( outputStream ); out.write( 1 ); verify( outputStream ).write( 1 ); }