use of org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.EchoInputBuilder in project openflowplugin by opendaylight.
the class EchoServiceTest method testBuildRequest.
@Test
public void testBuildRequest() throws Exception {
EchoInputBuilder sendEchoInput = new EchoInputBuilder().setData(DUMMY_DATA);
final OfHeader request = this.echoService.buildRequest(new Xid(DUMMY_XID_VALUE), sendEchoInput);
assertEquals(DUMMY_XID_VALUE, request.getXid());
assertTrue(request instanceof EchoInput);
final byte[] data = ((EchoInput) request).getData();
assertArrayEquals(DUMMY_DATA, data);
assertEquals(OFConstants.OFP_VERSION_1_3, request.getVersion().shortValue());
}
Aggregations