@@ -0,0 +1,1909 @@
+/*%0A * Copyright (c) 2021 PANTHEON.tech, s.r.o. and others.  All rights reserved.%0A *%0A * This program and the accompanying materials are made available under the%0A * terms of the Eclipse Public License v1.0 which accompanies this distribution,%0A * and is available at http://www.eclipse.org/legal/epl-v10.html%0A */%0Apackage org.opendaylight.yangtools.yang.data.codec.binfmt;%0A%0Aimport static org.mockito.ArgumentMatchers.any;%0Aimport static org.mockito.Mockito.doCallRealMethod;%0Aimport static org.mockito.Mockito.doNothing;%0Aimport static org.mockito.Mockito.verify;%0A%0Aimport java.io.IOException;%0Aimport org.junit.Before;%0Aimport org.junit.Test;%0Aimport org.junit.runner.RunWith;%0Aimport org.mockito.Mock;%0Aimport org.mockito.junit.MockitoJUnitRunner;%0Aimport org.opendaylight.yangtools.yang.common.QName;%0Aimport org.opendaylight.yangtools.yang.data.api.schema.ContainerNode;%0Aimport org.opendaylight.yangtools.yang.data.impl.schema.ImmutableNodes;%0A%0A@RunWith(MockitoJUnitRunner.StrictStubs.class)%0Apublic class NormalizedNodeDataOutputTest %7B%0A    @Mock%0A    public NormalizedNodeDataOutput output;%0A%0A    @Before%0A    public void before() throws IOException %7B%0A        doCallRealMethod().when(output).writeOptionalNormalizedNode(any());%0A    %7D%0A%0A    @Test%0A    public void testWriteOptionalNormalizedNodeAbsent() throws IOException %7B%0A        doNothing().when(output).writeBoolean(false);%0A        output.writeOptionalNormalizedNode(null);%0A        verify(output).writeBoolean(false);%0A    %7D%0A%0A    @Test%0A    public void testWriteOptionalNormalizedNodePresent() throws IOException %7B%0A        final ContainerNode node = ImmutableNodes.containerNode(QName.create(%22test%22, %22test%22));%0A        doNothing().when(output).writeBoolean(true);%0A        doNothing().when(output).writeNormalizedNode(node);%0A        output.writeOptionalNormalizedNode(node);%0A        verify(output).writeBoolean(true);%0A        verify(output).writeNormalizedNode(node);%0A    %7D%0A%7D%0A

Add NormalizedNodeDataOutputTest