StreamingServiceTransExecutor { public void stopAll() { stopService(); clearCache(); } StreamingServiceTransExecutor( final StreamServiceKey key, Trans serviceTrans, final String serviceStepName,
                                        final int windowMaxRowLimit, final long windowMaxTimeLimit,
                                        final Context context ); Trans getServiceTrans(); StreamServiceKey getKey(); long getWindowMaxRowLimit(); long getWindowMaxTimeLimit(); StreamExecutionListener getBuffer( String query, Consumer<List<RowMetaAndData>> windowConsumer, final IDataServiceClientService.StreamingMode windowMode,
                                            long windowSize, long windowEvery, long windowLimit ); void clearCache(); void clearCacheByKey( String key ); void stopAll(); StreamExecutionListener touchServiceListener( String key );  }
@Test public void testStopAll() { serviceExecutor.getBuffer( MOCK_QUERY, windowConsumer, MOCK_WINDOW_MODE_ROW_BASED, 1, 0, 0 ); serviceExecutor.stopAll(); verify( serviceTrans ).stopAll(); verify( log ).logDetailed( DataServiceConstants.STREAMING_TRANSFORMATION_STOPPED ); }
@Test public void testStopAllNoServiceRunning() { serviceExecutor.stopAll(); verify( serviceTrans, times( 0 ) ).stopAll(); verify( log, times( 0 ) ).logDetailed( DataServiceConstants.STREAMING_TRANSFORMATION_STOPPED ); }