PushDownOptimizationMeta implements XulEventSource { public ListenableFuture<Boolean> activate( DataServiceExecutor executor ) { return getType().activate( executor, this ); }  String getName(); void setName( String name ); String getStepName(); void setStepName( String stepName ); PushDownType getType(); void setType( PushDownType type ); boolean isEnabled(); void setEnabled( boolean enabled ); ListenableFuture<Boolean> activate( DataServiceExecutor executor ); OptimizationImpactInfo preview( DataServiceExecutor executor ); @Override String toString(); @Override void addPropertyChangeListener( PropertyChangeListener propertyChangeListener ); @Override void removePropertyChangeListener( PropertyChangeListener propertyChangeListener ); static final String PUSH_DOWN_STEP_NAME; }
@Test public void testActivate() throws Exception { ListenableFuture<Boolean> future = Futures.immediateFuture( true ); when( pushDownType.activate( executor, pushDownOptimizationMeta ) ).thenReturn( future ); assertThat( pushDownOptimizationMeta.activate( executor ), sameInstance( future ) ); }