YANG uses and UT
Change-Id: Id3ec5cfed2b8e2a7d2d580786c70b5804f03ecfa
diff --git a/src/main/java/org/onosproject/yangutils/parser/impl/listeners/OutputListener.java b/src/main/java/org/onosproject/yangutils/parser/impl/listeners/OutputListener.java
index 2dfa2ed..83fec50 100644
--- a/src/main/java/org/onosproject/yangutils/parser/impl/listeners/OutputListener.java
+++ b/src/main/java/org/onosproject/yangutils/parser/impl/listeners/OutputListener.java
@@ -36,6 +36,8 @@
import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorType.MISSING_HOLDER;
import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorType.UNHANDLED_PARSED_DATA;
import static org.onosproject.yangutils.parser.impl.parserutils.ListenerValidation.checkStackIsNotEmpty;
+import static org.onosproject.yangutils.parser.impl.parserutils.ListenerValidation.validateCardinalityNonZero;
+import static org.onosproject.yangutils.utils.YangConstructType.DATA_DEF_DATA;
import static org.onosproject.yangutils.utils.YangConstructType.OUTPUT_DATA;
/*
@@ -86,6 +88,9 @@
// Check for stack to be non empty.
checkStackIsNotEmpty(listener, MISSING_HOLDER, OUTPUT_DATA, "", ENTRY);
+ validateCardinalityNonZero(ctx.dataDefStatement(), DATA_DEF_DATA,
+ OUTPUT_DATA, "", ctx);
+
Parsable curData = listener.getParsedDataStack().peek();
if (curData instanceof YangRpc) {