Buggy code:
@ RunWith ( PaxExam . class ) @ ExamReactorStrategy ( PerClass . class ) public class OFPluginFlowTest { static final Logger LOG = LoggerFactory . getLogger ( OFPluginFlowTest . class ) ; private static final ArrayBlockingQueue < Runnable > SCENARIO_POOL_QUEUE = new ArrayBlockingQueue < > ( 1 ) ; @ Inject @ Filter ( timeout = 20000 ) OpenflowPluginProvider openflowPluginProvider ; @ Inject BundleContext ctx ; @ Inject @ Filter ( timeout = 20000 ) static DataBroker dataBroker ; @ Inject @ Filter ( timeout = 20000 ) NotificationProviderService notificationService ; private SimpleClient switchSim ; private ThreadPoolLoggingExecutor scenarioPool ; @ Before public void setUp ( ) throws InterruptedException { } @ After public void tearDown ( ) { } final class TriggerTestListener implements DataChangeListener { public TriggerTestListener ( ) { } @ Override public void onDataChanged ( AsyncDataChangeEvent < InstanceIdentifier < ? > , DataObject > arg0 ) { } } @ Test public void testFlowMod ( ) throws Exception { OFPluginFlowTest . LOG . debug ( "testFlowMod<seq2seq4repair_space>integration<seq2seq4repair_space>test" ) ; OFPluginFlowTest . TriggerTestListener brmListener = new OFPluginFlowTest . TriggerTestListener ( ) ; OFPluginFlowTest . dataBroker . registerDataChangeListener ( OPERATIONAL , OFPluginFlowTest . getWildcardPath ( ) , brmListener , BASE ) ; switchSim = OFPluginFlowTest . createSimpleClient ( ) ; switchSim . setSecuredClient ( false ) ; Deque < ClientEvent > handshakeScenario = ScenarioFactory . createHandshakeScenarioVBM ( VERSION_BITMAP_13 , ( ( short ) ( 0 ) ) , VERSION_BITMAP_10_13 , false ) ; <START_BUG> handshakeScenario . addFirst ( new SleepEvent ( 3000L ) ) ; <END_BUG> ScenarioFactory . appendPostHandshakeScenario ( handshakeScenario , true ) ; WaitForMessageEvent flowModEvent = new WaitForMessageEvent ( ByteBufUtils . hexStringToBytes ( ( "04<seq2seq4repair_space>0e<seq2seq4repair_space>00<seq2seq4repair_space>58<seq2seq4repair_space>00<seq2seq4repair_space>00<seq2seq4repair_space>00<seq2seq4repair_space>05<seq2seq4repair_space>00<seq2seq4repair_space>00<seq2seq4repair_space>00<seq2seq4repair_space>00<seq2seq4repair_space>00<seq2seq4repair_space>00<seq2seq4repair_space>00<seq2seq4repair_space>0a<seq2seq4repair_space>" + ( ( ( ( "00<seq2seq4repair_space>00<seq2seq4repair_space>00<seq2seq4repair_space>00<seq2seq4repair_space>00<seq2seq4repair_space>00<seq2seq4repair_space>00<seq2seq4repair_space>0a<seq2seq4repair_space>00<seq2seq4repair_space>00<seq2seq4repair_space>00<seq2seq4repair_space>00<seq2seq4repair_space>00<seq2seq4repair_space>00<seq2seq4repair_space>80<seq2seq4repair_space>00<seq2seq4repair_space>" + "ff<seq2seq4repair_space>ff<seq2seq4repair_space>ff<seq2seq4repair_space>ff<seq2seq4repair_space>ff<seq2seq4repair_space>ff<seq2seq4repair_space>ff<seq2seq4repair_space>ff<seq2seq4repair_space>ff<seq2seq4repair_space>ff<seq2seq4repair_space>ff<seq2seq4repair_space>ff<seq2seq4repair_space>00<seq2seq4repair_space>01<seq2seq4repair_space>00<seq2seq4repair_space>00<seq2seq4repair_space>" ) + "00<seq2seq4repair_space>01<seq2seq4repair_space>00<seq2seq4repair_space>16<seq2seq4repair_space>80<seq2seq4repair_space>00<seq2seq4repair_space>0a<seq2seq4repair_space>02<seq2seq4repair_space>08<seq2seq4repair_space>00<seq2seq4repair_space>80<seq2seq4repair_space>00<seq2seq4repair_space>19<seq2seq4repair_space>08<seq2seq4repair_space>0a<seq2seq4repair_space>00<seq2seq4repair_space>" ) + "00<seq2seq4repair_space>01<seq2seq4repair_space>ff<seq2seq4repair_space>ff<seq2seq4repair_space>ff<seq2seq4repair_space>00<seq2seq4repair_space>00<seq2seq4repair_space>00<seq2seq4repair_space>00<seq2seq4repair_space>04<seq2seq4repair_space>00<seq2seq4repair_space>10<seq2seq4repair_space>00<seq2seq4repair_space>00<seq2seq4repair_space>00<seq2seq4repair_space>00<seq2seq4repair_space>" ) + "00<seq2seq4repair_space>18<seq2seq4repair_space>00<seq2seq4repair_space>08<seq2seq4repair_space>00<seq2seq4repair_space>00<seq2seq4repair_space>00<seq2seq4repair_space>00" ) ) ) ) ; handshakeScenario . addFirst ( flowModEvent ) ; ScenarioHandler scenario = new ScenarioHandler ( handshakeScenario ) ; switchSim . setScenarioHandler ( scenario ) ; scenarioPool . execute ( switchSim ) ; OFPluginFlowTest . LOG . info ( "finishing<seq2seq4repair_space>testFlowMod" ) ; } private static InstanceIdentifier < ? > getWildcardPath ( ) { } private static SimpleClient createSimpleClient ( ) { } private static long getFailSafeTimeout ( ) { } @ Configuration public Option [ ] config ( ) { } static FlowBuilder createTestFlow ( ) { } private static MatchBuilder createMatch1 ( ) { } private static InstructionsBuilder createDecNwTtlInstructions ( ) { } static void writeFlow ( FlowBuilder flow , InstanceIdentifier < FlowCapableNode > flowNodeIdent ) { } private static final Flow readFlow ( InstanceIdentifier < Flow > flow ) { } }

Fix:
handshakeScenario . addFirst ( new SleepEvent ( 6000L ) ) ;