StreamingOverlay implements DataServiceDialog.OptimizationOverlay { @Override public void apply( DataServiceDialog dialog ) throws KettleException { dialog.applyOverlay( this, XUL_OVERLAY ).addEventHandler( controller ); try { controller.initBindings( dialog.getModel() ); } catch ( Exception e ) { throw new KettleException( e ); } } StreamingOverlay( StreamingController controller ); @Override double getPriority(); @Override void apply( DataServiceDialog dialog );  }
@Test public void testApply() throws KettleException, InvocationTargetException, XulException { streamingOverlay.apply( dialog ); verify( controller ).initBindings( model ); }
@Test ( expected = KettleException.class ) public void testApplyException() throws KettleException, InvocationTargetException, XulException { doThrow( new XulException() ).when( controller ).initBindings( model ); streamingOverlay.apply( dialog ); }