BUG-865: deprecate pre-Beryllium parser elements
[yangtools.git] / yang / yang-parser-impl / src / test / java / org / opendaylight / yangtools / yang / parser / util / RefineHolderTest.java
index ee2d7facbee4ceb61460ed723633f3849ce2aceb..0357815419c4d02c0fe8c664830d91997d868183 100644 (file)
@@ -11,7 +11,7 @@ import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertTrue;
-
+import com.google.common.base.Optional;
 import java.net.URI;
 import java.net.URISyntaxException;
 import java.util.ArrayList;
@@ -26,6 +26,10 @@ import org.opendaylight.yangtools.yang.parser.builder.api.RefineBuilder;
 import org.opendaylight.yangtools.yang.parser.builder.impl.RefineHolderImpl;
 import org.opendaylight.yangtools.yang.parser.builder.impl.UnknownSchemaNodeBuilderImpl;
 
+/**
+ * @deprecated Pre-Beryllium implementation, scheduled for removal.
+ */
+@Deprecated
 public class RefineHolderTest {
 
     private RefineHolderImpl rh;
@@ -130,13 +134,17 @@ public class RefineHolderTest {
     @Test
     public void testMustEqualsBranch() {
         assertEquals("rh should equal to rh1", rh, rh1);
-        rh1.setMust(new MustDefinitionImpl("mustStr1", "description1", "reference1", "errorAppTag1", "errorMessage1"));
+        rh1.setMust(MustDefinitionImpl.create("mustStr1", Optional.of("description1"), Optional.of("reference1"),
+                Optional.of("errorAppTag1"), Optional.of("errorMessage1")));
         assertFalse("rh shouldn't equal to rh1", rh.equals(rh1));
-        rh.setMust(new MustDefinitionImpl("mustStr1", "description1", "reference1", "errorAppTag1", "errorMessage1"));
+        rh.setMust(MustDefinitionImpl.create("mustStr1", Optional.of("description1"), Optional.of("reference1"),
+                Optional.of("errorAppTag1"), Optional.of("errorMessage1")));
         assertEquals("rh should equal to rh1", rh, rh1);
-        rh.setMust(new MustDefinitionImpl("mustStr", "description", "reference", "errorAppTag", "errorMessage"));
+        rh.setMust(MustDefinitionImpl.create("mustStr", Optional.of("description"), Optional.of("reference"),
+                Optional.of("errorAppTag"), Optional.of("errorMessage")));
         assertFalse("rh shouldn't equal to rh1", rh.equals(rh1));
-        rh1.setMust(new MustDefinitionImpl("mustStr", "description", "reference", "errorAppTag", "errorMessage"));
+        rh1.setMust(MustDefinitionImpl.create("mustStr", Optional.of("description"), Optional.of("reference"),
+                Optional.of("errorAppTag"), Optional.of("errorMessage")));
     }
 
     @Test
@@ -163,7 +171,7 @@ public class RefineHolderTest {
         rh1.setReference("reference");
     }
 
-    private URI getUri(final String uri) {
+    private static URI getUri(final String uri) {
         URI simpleUri = null;
         boolean instantionated = false;
         try {