@Test public void switchWriteError() throws Throwable { IOFSwitch sw = createMock(IOFSwitch.class); setupSwitchMock(sw, dpId); swWriteSecondFail(sw); doneWithSetUp(sw); OFFactory ofFactory = sw.getOFFactory(); CompletableFuture<Optional<OFMessage>> future = null; try (Session session = subject.open(context, sw)) { session.write(makePacketOut(ofFactory, 1)); future = session.write(makePacketOut(ofFactory, 2)); } try { future.get(1, TimeUnit.SECONDS); Assert.fail(); } catch (ExecutionException e) { Assert.assertNotNull(e.getCause()); Assert.assertTrue(e.getCause() instanceof SwitchWriteException); } }
public Session open(IOFSwitch sw) { return open(new MessageContext(), sw); }
SessionService implements IService, IInputTranslator { public Session open(IOFSwitch sw) { return open(new MessageContext(), sw); } }
SessionService implements IService, IInputTranslator { public Session open(IOFSwitch sw) { return open(new MessageContext(), sw); }  }
SessionService implements IService, IInputTranslator { public Session open(IOFSwitch sw) { return open(new MessageContext(), sw); }  Session open(IOFSwitch sw); Session open(MessageContext context, IOFSwitch sw); @Override void setup(FloodlightModuleContext moduleContext); @Override Command makeCommand(CommandContext context, OfInput input); }
SessionService implements IService, IInputTranslator { public Session open(IOFSwitch sw) { return open(new MessageContext(), sw); }  Session open(IOFSwitch sw); Session open(MessageContext context, IOFSwitch sw); @Override void setup(FloodlightModuleContext moduleContext); @Override Command makeCommand(CommandContext context, OfInput input);  }