Try to use ModMplsHeaderInstruction and ModVlanHeaderInstruction

Change-Id: I0b486907ef718a6dfa3e92696397fe5a7e851aed
diff --git a/core/net/src/main/java/org/onosproject/net/intent/impl/compiler/PathCompiler.java b/core/net/src/main/java/org/onosproject/net/intent/impl/compiler/PathCompiler.java
index 4e38e34..3f8bba4 100644
--- a/core/net/src/main/java/org/onosproject/net/intent/impl/compiler/PathCompiler.java
+++ b/core/net/src/main/java/org/onosproject/net/intent/impl/compiler/PathCompiler.java
@@ -15,16 +15,8 @@
  */
 package org.onosproject.net.intent.impl.compiler;
 
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.Optional;
-import java.util.Set;
-import java.util.stream.Collectors;
-import java.util.stream.Stream;
-
+import com.google.common.collect.ImmutableList;
+import com.google.common.collect.Sets;
 import org.onlab.packet.EthType;
 import org.onlab.packet.Ethernet;
 import org.onlab.packet.MplsLabel;
@@ -52,8 +44,15 @@
 import org.onosproject.net.resource.Resources;
 import org.slf4j.Logger;
 
-import com.google.common.collect.ImmutableList;
-import com.google.common.collect.Sets;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.Optional;
+import java.util.Set;
+import java.util.stream.Collectors;
+import java.util.stream.Stream;
 
 import static org.onosproject.net.LinkKey.linkKey;
 
@@ -214,10 +213,11 @@
                                 instruction -> instruction instanceof L2ModificationInstruction.ModVlanIdInstruction)
                         .map(x -> (L2ModificationInstruction.ModVlanIdInstruction) x).findAny();
 
-                Optional<L2ModificationInstruction.PopVlanInstruction> popVlanInstruction = intent.treatment()
+                Optional<L2ModificationInstruction.ModVlanHeaderInstruction> popVlanInstruction = intent.treatment()
                         .allInstructions().stream().filter(
-                                instruction -> instruction instanceof L2ModificationInstruction.PopVlanInstruction)
-                        .map(x -> (L2ModificationInstruction.PopVlanInstruction) x).findAny();
+                                instruction -> instruction instanceof
+                                        L2ModificationInstruction.ModVlanHeaderInstruction)
+                        .map(x -> (L2ModificationInstruction.ModVlanHeaderInstruction) x).findAny();
 
                 if (!modVlanIdInstruction.isPresent() && !popVlanInstruction.isPresent()) {
                     if (vlanCriterion.isPresent()) {
diff --git a/core/net/src/test/java/org/onosproject/net/intent/impl/compiler/PathIntentCompilerTest.java b/core/net/src/test/java/org/onosproject/net/intent/impl/compiler/PathIntentCompilerTest.java
index 4e5a602..ae7859c 100644
--- a/core/net/src/test/java/org/onosproject/net/intent/impl/compiler/PathIntentCompilerTest.java
+++ b/core/net/src/test/java/org/onosproject/net/intent/impl/compiler/PathIntentCompilerTest.java
@@ -317,7 +317,7 @@
                 .collect(Collectors.toSet()), hasSize(1));
         assertThat(vlanMod.iterator().next().vlanId(), is(egressVlan));
         assertThat(rule3.treatment().allInstructions().stream()
-                .filter(treat -> treat instanceof L2ModificationInstruction.PopVlanInstruction)
+                .filter(treat -> treat instanceof L2ModificationInstruction.ModVlanHeaderInstruction)
                 .collect(Collectors.toSet()), hasSize(0));
 
         sut.deactivate();
@@ -350,7 +350,7 @@
                                .filter(treat -> treat instanceof L2ModificationInstruction.ModVlanIdInstruction)
                                .collect(Collectors.toSet()), hasSize(0));
             assertThat(trafficTreatment.allInstructions().stream()
-                               .filter(treat -> treat instanceof L2ModificationInstruction.PopVlanInstruction)
+                               .filter(treat -> treat instanceof L2ModificationInstruction.ModVlanHeaderInstruction)
                                .collect(Collectors.toSet()), hasSize(1));
 
         }
@@ -436,7 +436,7 @@
                                .filter(treat -> treat instanceof L2ModificationInstruction.ModMplsLabelInstruction)
                                .collect(Collectors.toSet()), hasSize(0));
             assertThat(trafficTreatment.allInstructions().stream()
-                               .filter(treat -> treat instanceof L2ModificationInstruction.PushHeaderInstructions)
+                               .filter(treat -> treat instanceof L2ModificationInstruction.ModMplsHeaderInstruction)
                                .collect(Collectors.toSet()), hasSize(1));
 
         }