@Test public void testSendToSwitch() { ByteBuf input = UnpooledByteBufAllocator.DEFAULT.buffer(); Mockito.doCallRealMethod().when(shimRelay).sendToSwitch(connectionAdapter, input, ofVersion, coreConnector, 1L, 1); shimRelay.sendToSwitch(connectionAdapter, input, ofVersion, coreConnector, 1L, 1); Mockito.verify(shimRelay).sendDataObjectToSwitch(connectionAdapter, msg, ofVersion, coreConnector, 1L, 1); }
public void sendToSwitch(ConnectionAdapter connectionAdapter, ByteBuf input, short ofVersion, ZeroMQBaseConnector coreConnector, long datapathId, int moduleId) { DeserializationFactory factory = createDeserializationFactory(); DeserializerRegistry registry = new DeserializerRegistryImpl(); registry.init(); factory.setRegistry(registry); DataObject msg = factory.deserialize(input, ofVersion); sendDataObjectToSwitch(connectionAdapter, msg, ofVersion, coreConnector, datapathId, moduleId); }
ShimRelay { public void sendToSwitch(ConnectionAdapter connectionAdapter, ByteBuf input, short ofVersion, ZeroMQBaseConnector coreConnector, long datapathId, int moduleId) { DeserializationFactory factory = createDeserializationFactory(); DeserializerRegistry registry = new DeserializerRegistryImpl(); registry.init(); factory.setRegistry(registry); DataObject msg = factory.deserialize(input, ofVersion); sendDataObjectToSwitch(connectionAdapter, msg, ofVersion, coreConnector, datapathId, moduleId); } }
ShimRelay { public void sendToSwitch(ConnectionAdapter connectionAdapter, ByteBuf input, short ofVersion, ZeroMQBaseConnector coreConnector, long datapathId, int moduleId) { DeserializationFactory factory = createDeserializationFactory(); DeserializerRegistry registry = new DeserializerRegistryImpl(); registry.init(); factory.setRegistry(registry); DataObject msg = factory.deserialize(input, ofVersion); sendDataObjectToSwitch(connectionAdapter, msg, ofVersion, coreConnector, datapathId, moduleId); }  }
ShimRelay { public void sendToSwitch(ConnectionAdapter connectionAdapter, ByteBuf input, short ofVersion, ZeroMQBaseConnector coreConnector, long datapathId, int moduleId) { DeserializationFactory factory = createDeserializationFactory(); DeserializerRegistry registry = new DeserializerRegistryImpl(); registry.init(); factory.setRegistry(registry); DataObject msg = factory.deserialize(input, ofVersion); sendDataObjectToSwitch(connectionAdapter, msg, ofVersion, coreConnector, datapathId, moduleId); }  SerializationFactory createSerializationFactory(); DeserializationFactory createDeserializationFactory(); void sendOpenFlowMessageToCore(ZeroMQBaseConnector coreConnector, DataObject msg, short ofVersion, long xId,
            long datapathId, int moduleId); void sendToSwitch(ConnectionAdapter connectionAdapter, ByteBuf input, short ofVersion,
            ZeroMQBaseConnector coreConnector, long datapathId, int moduleId); void sendDataObjectToSwitch(ConnectionAdapter connectionAdapter, DataObject msg, short ofVersion,
            ZeroMQBaseConnector coreConnector, long datapathId, int moduleId); String getImplementedInterface(DataObject message); void sendResponseToCore(Future<RpcResult<E>> switchReply,
            final ZeroMQBaseConnector coreConnector, final short ofVersion, final long xId, final long datapathId,
            final int moduleId); }
ShimRelay { public void sendToSwitch(ConnectionAdapter connectionAdapter, ByteBuf input, short ofVersion, ZeroMQBaseConnector coreConnector, long datapathId, int moduleId) { DeserializationFactory factory = createDeserializationFactory(); DeserializerRegistry registry = new DeserializerRegistryImpl(); registry.init(); factory.setRegistry(registry); DataObject msg = factory.deserialize(input, ofVersion); sendDataObjectToSwitch(connectionAdapter, msg, ofVersion, coreConnector, datapathId, moduleId); }  SerializationFactory createSerializationFactory(); DeserializationFactory createDeserializationFactory(); void sendOpenFlowMessageToCore(ZeroMQBaseConnector coreConnector, DataObject msg, short ofVersion, long xId,
            long datapathId, int moduleId); void sendToSwitch(ConnectionAdapter connectionAdapter, ByteBuf input, short ofVersion,
            ZeroMQBaseConnector coreConnector, long datapathId, int moduleId); void sendDataObjectToSwitch(ConnectionAdapter connectionAdapter, DataObject msg, short ofVersion,
            ZeroMQBaseConnector coreConnector, long datapathId, int moduleId); String getImplementedInterface(DataObject message); void sendResponseToCore(Future<RpcResult<E>> switchReply,
            final ZeroMQBaseConnector coreConnector, final short ofVersion, final long xId, final long datapathId,
            final int moduleId);  }