use of org.opendaylight.yang.gen.v1.urn.yang.foo.rev160101._boolean.container.BooleanListKey in project mdsal by opendaylight.
the class Bug5845booleanKeyTest method testBug5845.
@Test
public void testBug5845() throws Exception {
final BooleanListKey blk = new BooleanListKey(true, true);
final BooleanContainer booleanContainer = new BooleanContainerBuilder().setBooleanList(Collections.singletonMap(blk, new BooleanListBuilder().withKey(blk).setBooleanLeaf1(true).setBooleanLeaf2(true).build())).build();
final BooleanListIntKey blik = new BooleanListIntKey((byte) 1);
final BooleanContainer booleanContainerInt = new BooleanContainerBuilder().setBooleanListInt(Collections.singletonMap(blik, new BooleanListIntBuilder().withKey(blik).setBooleanLeafInt((byte) 1).build())).build();
final BindingDataObjectCodecTreeNode<BooleanContainer> subtreeCodec = codecContext.getSubtreeCodec(InstanceIdentifier.create(BooleanContainer.class));
final NormalizedNode serializedInt = subtreeCodec.serialize(booleanContainerInt);
assertNotNull(serializedInt);
final NormalizedNode serialized = subtreeCodec.serialize(booleanContainer);
assertNotNull(serialized);
}
Aggregations