* terms of the Eclipse Public License v1.0 which accompanies this distribution,
* and is available at http://www.eclipse.org/legal/epl-v10.html
*/
-
package org.opendaylight.openflowplugin.impl.protocol.deserialization.match;
import static org.junit.Assert.assertEquals;
public class EthernetSourceEntryDeserializerTest extends AbstractMatchEntryDeserializerTest {
@Test
- public void deserializeEntry() throws Exception {
+ public void deserializeEntry() {
final ByteBuf in = UnpooledByteBufAllocator.DEFAULT.buffer();
final MacAddress ethernetSourceAddress = new MacAddress("00:01:02:03:04:05");
final MacAddress ethernetSourceAddressMask = new MacAddress("00:00:00:00:00:00");
writeHeader(in, false);
- in.writeBytes(IetfYangUtil.INSTANCE.bytesFor(ethernetSourceAddress));
+ in.writeBytes(IetfYangUtil.macAddressBytes(ethernetSourceAddress));
assertEquals(ethernetSourceAddress.getValue(),
deserialize(in).getEthernetMatch().getEthernetSource().getAddress().getValue());
assertEquals(0, in.readableBytes());
writeHeader(in, true);
- in.writeBytes(IetfYangUtil.INSTANCE.bytesFor(ethernetSourceAddress));
- in.writeBytes(IetfYangUtil.INSTANCE.bytesFor(ethernetSourceAddressMask));
+ in.writeBytes(IetfYangUtil.macAddressBytes(ethernetSourceAddress));
+ in.writeBytes(IetfYangUtil.macAddressBytes(ethernetSourceAddressMask));
final EthernetSource desAddress = deserialize(in).getEthernetMatch().getEthernetSource();
assertEquals(ethernetSourceAddress.getValue(), desAddress.getAddress().getValue());