Fix for ONOS-5175. GroupId refactoring.

Science DefaultGroupId was deprecated, remove it from ONOS

Change-Id: I82394e58ec1ba10c37492ed77546e233de9f934f
diff --git a/apps/pce/pcerest/src/test/java/org/onosproject/pcerest/PcePathResourceTest.java b/apps/pce/pcerest/src/test/java/org/onosproject/pcerest/PcePathResourceTest.java
index ae2e32c..140739d 100644
--- a/apps/pce/pcerest/src/test/java/org/onosproject/pcerest/PcePathResourceTest.java
+++ b/apps/pce/pcerest/src/test/java/org/onosproject/pcerest/PcePathResourceTest.java
@@ -49,7 +49,7 @@
 import org.onlab.packet.IpAddress;
 import org.onlab.rest.BaseResource;
 import org.onosproject.codec.CodecService;
-import org.onosproject.core.DefaultGroupId;
+import org.onosproject.core.GroupId;
 import org.onosproject.incubator.net.tunnel.DefaultTunnel;
 import org.onosproject.incubator.net.tunnel.IpTunnelEndPoint;
 import org.onosproject.incubator.net.tunnel.Tunnel;
@@ -80,7 +80,7 @@
     private final TunnelService tunnelService = createMock(TunnelService.class);
     private final TunnelEndPoint src = IpTunnelEndPoint.ipTunnelPoint(IpAddress.valueOf(23423));
     private final TunnelEndPoint dst = IpTunnelEndPoint.ipTunnelPoint(IpAddress.valueOf(32421));
-    private final DefaultGroupId groupId = new DefaultGroupId(92034);
+    private final GroupId groupId = new GroupId(92034);
     private final TunnelName tunnelName = TunnelName.tunnelName("TunnelName");
     private final TunnelId tunnelId = TunnelId.valueOf("41654654");
     private final ProviderId producerName = new ProviderId("producer1", "13");
diff --git a/apps/scalablegateway/src/main/java/org/onosproject/scalablegateway/impl/SelectGroupHandler.java b/apps/scalablegateway/src/main/java/org/onosproject/scalablegateway/impl/SelectGroupHandler.java
index fdb4962..d4ff589 100644
--- a/apps/scalablegateway/src/main/java/org/onosproject/scalablegateway/impl/SelectGroupHandler.java
+++ b/apps/scalablegateway/src/main/java/org/onosproject/scalablegateway/impl/SelectGroupHandler.java
@@ -19,7 +19,6 @@
 import com.google.common.collect.Lists;
 import org.onlab.packet.Ip4Address;
 import org.onosproject.core.ApplicationId;
-import org.onosproject.core.DefaultGroupId;
 import org.onosproject.core.GroupId;
 import org.onosproject.net.DeviceId;
 import org.onosproject.net.Port;
@@ -116,7 +115,7 @@
     }
 
     private GroupId getGroupId(DeviceId srcDeviceId) {
-        return new DefaultGroupId(srcDeviceId.toString().hashCode());
+        return new GroupId(srcDeviceId.toString().hashCode());
     }
 
     /**
diff --git a/apps/tetunnel/app/src/main/java/org/onosproject/tetunnel/impl/TeTunnelManager.java b/apps/tetunnel/app/src/main/java/org/onosproject/tetunnel/impl/TeTunnelManager.java
index 3fc28fb..03910ed 100644
--- a/apps/tetunnel/app/src/main/java/org/onosproject/tetunnel/impl/TeTunnelManager.java
+++ b/apps/tetunnel/app/src/main/java/org/onosproject/tetunnel/impl/TeTunnelManager.java
@@ -24,7 +24,7 @@
 import org.apache.felix.scr.annotations.Service;
 import org.onosproject.core.ApplicationId;
 import org.onosproject.core.CoreService;
-import org.onosproject.core.DefaultGroupId;
+import org.onosproject.core.GroupId;
 import org.onosproject.incubator.net.tunnel.DefaultTunnel;
 import org.onosproject.incubator.net.tunnel.Tunnel;
 import org.onosproject.incubator.net.tunnel.TunnelAdminService;
@@ -107,7 +107,7 @@
                                                                teTunnel.srcTp()),
                                           new TeTunnelEndpoint(teTunnel.dstNode(),
                                                                teTunnel.dstTp()),
-                                          Tunnel.Type.MPLS, new DefaultGroupId(0),
+                                          Tunnel.Type.MPLS, new GroupId(0),
                                           tunnelId,
                                           TunnelName.tunnelName(teTunnel.name()),
                                           null,
diff --git a/apps/vtn/vtnmgr/src/main/java/org/onosproject/vtn/table/impl/L2ForwardServiceImpl.java b/apps/vtn/vtnmgr/src/main/java/org/onosproject/vtn/table/impl/L2ForwardServiceImpl.java
index 582aad3..8050356 100644
--- a/apps/vtn/vtnmgr/src/main/java/org/onosproject/vtn/table/impl/L2ForwardServiceImpl.java
+++ b/apps/vtn/vtnmgr/src/main/java/org/onosproject/vtn/table/impl/L2ForwardServiceImpl.java
@@ -25,7 +25,7 @@
 import org.onlab.packet.IpAddress;
 import org.onlab.packet.MacAddress;
 import org.onosproject.core.ApplicationId;
-import org.onosproject.core.DefaultGroupId;
+import org.onosproject.core.GroupId;
 import org.onosproject.net.DeviceId;
 import org.onosproject.net.PortNumber;
 import org.onosproject.net.behaviour.ExtensionTreatmentResolver;
@@ -101,7 +101,7 @@
             if (type == Objective.Operation.REMOVE && inPort.equals(lp)) {
                 flag = false;
             }
-            treatment.group(new DefaultGroupId(GROUP_ID));
+            treatment.group(new GroupId(GROUP_ID));
             ForwardingObjective.Builder objective = DefaultForwardingObjective
                     .builder().withTreatment(treatment.build())
                     .withSelector(selector).fromApp(appId).makePermanent()
diff --git a/cli/src/main/java/org/onosproject/cli/net/TunnelCreateCommand.java b/cli/src/main/java/org/onosproject/cli/net/TunnelCreateCommand.java
index db2722f..ac1623b 100644
--- a/cli/src/main/java/org/onosproject/cli/net/TunnelCreateCommand.java
+++ b/cli/src/main/java/org/onosproject/cli/net/TunnelCreateCommand.java
@@ -22,7 +22,7 @@
 import org.apache.karaf.shell.commands.Option;
 import org.onlab.packet.IpAddress;
 import org.onosproject.cli.AbstractShellCommand;
-import org.onosproject.core.DefaultGroupId;
+import org.onosproject.core.GroupId;
 import org.onosproject.incubator.net.tunnel.DefaultOpticalTunnelEndPoint;
 import org.onosproject.incubator.net.tunnel.DefaultTunnelDescription;
 import org.onosproject.incubator.net.tunnel.IpTunnelEndPoint;
@@ -188,7 +188,7 @@
                                                                 srcPoint,
                                                                 dstPoint,
                                                                 trueType,
-                                                                new DefaultGroupId(Integer.parseInt(groupId)),
+                                                                new GroupId(Integer.parseInt(groupId)),
                                                                 producerName,
                                                                 TunnelName
                                                                         .tunnelName(tunnelName),
diff --git a/core/api/src/main/java/org/onosproject/core/DefaultGroupId.java b/core/api/src/main/java/org/onosproject/core/DefaultGroupId.java
deleted file mode 100644
index 41dc7a2..0000000
--- a/core/api/src/main/java/org/onosproject/core/DefaultGroupId.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- * Copyright 2014-present Open Networking Laboratory
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.onosproject.core;
-
-import com.google.common.base.MoreObjects;
-
-import java.util.Objects;
-
-/**
- * Default implementation of {@link GroupId}.
- */
-@Deprecated
-public class DefaultGroupId extends GroupId {
-
-    public DefaultGroupId(int id) {
-        super(id);
-    }
-
-    // Constructor for serialization
-    private DefaultGroupId() {
-        super(0);
-    }
-
-    @Override
-    public int hashCode() {
-        return identifier;
-    }
-
-    @Override
-    public boolean equals(Object obj) {
-        if (this == obj) {
-            return true;
-        }
-        if (!(obj instanceof DefaultGroupId)) {
-            return false;
-        }
-        final DefaultGroupId other = (DefaultGroupId) obj;
-        return Objects.equals(this.identifier, other.identifier);
-    }
-
-    @Override
-    public String toString() {
-        return MoreObjects.toStringHelper(this)
-                .add("id", "0x" + Integer.toHexString(identifier))
-                .toString();
-    }
-}
diff --git a/core/api/src/main/java/org/onosproject/net/flow/DefaultFlowRule.java b/core/api/src/main/java/org/onosproject/net/flow/DefaultFlowRule.java
index 5b97fa3..7c632b1 100644
--- a/core/api/src/main/java/org/onosproject/net/flow/DefaultFlowRule.java
+++ b/core/api/src/main/java/org/onosproject/net/flow/DefaultFlowRule.java
@@ -21,7 +21,6 @@
 import com.google.common.hash.HashFunction;
 import com.google.common.hash.Hashing;
 import org.onosproject.core.ApplicationId;
-import org.onosproject.core.DefaultGroupId;
 import org.onosproject.core.GroupId;
 import org.onosproject.net.DeviceId;
 
@@ -97,7 +96,7 @@
 
 
         //FIXME: fields below will be removed.
-        this.groupId = new DefaultGroupId(0);
+        this.groupId = new GroupId(0);
         this.payLoad = null;
     }
 
@@ -155,7 +154,7 @@
         this.selector = selector;
         this.treatment = treatment;
         this.appId = appId.id();
-        this.groupId = new DefaultGroupId(0);
+        this.groupId = new GroupId(0);
         this.timeout = timeout;
         this.reason = FlowRemoveReason.NO_REASON;
         this.hardTimeout = hardTimeout;
diff --git a/core/api/src/test/java/org/onosproject/core/DefaultGroupIdTest.java b/core/api/src/test/java/org/onosproject/core/DefaultGroupIdTest.java
deleted file mode 100644
index 418b103..0000000
--- a/core/api/src/test/java/org/onosproject/core/DefaultGroupIdTest.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * Copyright 2014-present Open Networking Laboratory
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.onosproject.core;
-
-import com.google.common.testing.EqualsTester;
-import org.junit.Test;
-
-/**
- * Test for DefaultGroupId.
- */
-public class DefaultGroupIdTest {
-
-    /**
-     * Tests the equality of the instances.
-     */
-    @Test
-    public void testEquality() {
-        DefaultGroupId id1 = new DefaultGroupId((short) 1);
-        DefaultGroupId id2 = new DefaultGroupId((short) 1);
-        DefaultGroupId id3 = new DefaultGroupId((short) 2);
-
-        new EqualsTester()
-                .addEqualityGroup(id1, id2)
-                .addEqualityGroup(id3)
-                .testEquals();
-    }
-
-}
diff --git a/core/api/src/test/java/org/onosproject/net/flow/DefaultFlowRuleTest.java b/core/api/src/test/java/org/onosproject/net/flow/DefaultFlowRuleTest.java
index c0f11d6..829f4cc 100644
--- a/core/api/src/test/java/org/onosproject/net/flow/DefaultFlowRuleTest.java
+++ b/core/api/src/test/java/org/onosproject/net/flow/DefaultFlowRuleTest.java
@@ -17,7 +17,7 @@
 package org.onosproject.net.flow;
 
 import org.junit.Test;
-import org.onosproject.core.DefaultGroupId;
+import org.onosproject.core.GroupId;
 import org.onosproject.net.intent.IntentTestsMocks;
 
 import com.google.common.testing.EqualsTester;
@@ -127,13 +127,13 @@
     public void testCreationWithPayLoadByGroupTable() {
         final DefaultFlowRule rule =
                 new DefaultFlowRule(did("1"), null,
-                        null, 22, APP_ID, new DefaultGroupId(0),
+                        null, 22, APP_ID, new GroupId(0),
                 44, false, payLoad);
         assertThat(rule.deviceId(), is(did("1")));
         assertThat(rule.isPermanent(), is(false));
         assertThat(rule.priority(), is(22));
         assertThat(rule.timeout(), is(44));
-        assertThat(rule.groupId(), is(new DefaultGroupId(0)));
+        assertThat(rule.groupId(), is(new GroupId(0)));
         assertThat(defaultFlowRule1.payLoad(), is(payLoad));
     }
     /**
diff --git a/core/api/src/test/java/org/onosproject/net/flow/instructions/InstructionsTest.java b/core/api/src/test/java/org/onosproject/net/flow/instructions/InstructionsTest.java
index fd5c9ef..d09ec2b 100644
--- a/core/api/src/test/java/org/onosproject/net/flow/instructions/InstructionsTest.java
+++ b/core/api/src/test/java/org/onosproject/net/flow/instructions/InstructionsTest.java
@@ -23,7 +23,6 @@
 import org.onlab.packet.MplsLabel;
 import org.onlab.packet.TpPort;
 import org.onlab.packet.VlanId;
-import org.onosproject.core.DefaultGroupId;
 import org.onosproject.core.GroupId;
 import org.onosproject.net.ChannelSpacing;
 import org.onosproject.net.DeviceId;
@@ -732,8 +731,8 @@
 
     //  GroupInstruction
 
-    private final GroupId groupId1 = new DefaultGroupId(1);
-    private final GroupId groupId2 = new DefaultGroupId(2);
+    private final GroupId groupId1 = new GroupId(1);
+    private final GroupId groupId2 = new GroupId(2);
     private final Instruction groupInstruction1 = Instructions.createGroup(groupId1);
     private final Instruction sameAsGroupInstruction1 = Instructions.createGroup(groupId1);
     private final Instruction groupInstruction2 = Instructions.createGroup(groupId2);
diff --git a/core/api/src/test/java/org/onosproject/net/group/DefaultGroupTest.java b/core/api/src/test/java/org/onosproject/net/group/DefaultGroupTest.java
index 691852dd..e7dcb2f 100644
--- a/core/api/src/test/java/org/onosproject/net/group/DefaultGroupTest.java
+++ b/core/api/src/test/java/org/onosproject/net/group/DefaultGroupTest.java
@@ -16,7 +16,6 @@
 package org.onosproject.net.group;
 
 import org.junit.Test;
-import org.onosproject.core.DefaultGroupId;
 import org.onosproject.core.GroupId;
 import org.onosproject.net.NetTestTools;
 import org.onosproject.net.flow.DefaultTrafficTreatment;
@@ -32,9 +31,9 @@
  * Unit tests for DefaultGroup class.
  */
 public class DefaultGroupTest {
-    private final GroupId id1 = new DefaultGroupId(6);
-    private final GroupId id2 = new DefaultGroupId(7);
-    private final GroupId id3 = new DefaultGroupId(1234);
+    private final GroupId id1 = new GroupId(6);
+    private final GroupId id2 = new GroupId(7);
+    private final GroupId id3 = new GroupId(1234);
 
     private final GroupBucket bucket =
             DefaultGroupBucket.createSelectGroupBucket(
diff --git a/core/api/src/test/java/org/onosproject/net/group/GroupBucketTest.java b/core/api/src/test/java/org/onosproject/net/group/GroupBucketTest.java
index ede5056..ae97dfe 100644
--- a/core/api/src/test/java/org/onosproject/net/group/GroupBucketTest.java
+++ b/core/api/src/test/java/org/onosproject/net/group/GroupBucketTest.java
@@ -16,7 +16,6 @@
 package org.onosproject.net.group;
 
 import org.junit.Test;
-import org.onosproject.core.DefaultGroupId;
 import org.onosproject.core.GroupId;
 import org.onosproject.net.PortNumber;
 import org.onosproject.net.flow.DefaultTrafficTreatment;
@@ -36,7 +35,7 @@
  */
 public class GroupBucketTest {
 
-    private final GroupId groupId = new DefaultGroupId(7);
+    private final GroupId groupId = new GroupId(7);
     private final GroupId nullGroup = null;
 
     private final PortNumber nullPort = null;
diff --git a/core/api/src/test/java/org/onosproject/net/group/GroupOperationTest.java b/core/api/src/test/java/org/onosproject/net/group/GroupOperationTest.java
index 3ca0013..8e7c957 100644
--- a/core/api/src/test/java/org/onosproject/net/group/GroupOperationTest.java
+++ b/core/api/src/test/java/org/onosproject/net/group/GroupOperationTest.java
@@ -16,7 +16,6 @@
 package org.onosproject.net.group;
 
 import org.junit.Test;
-import org.onosproject.core.DefaultGroupId;
 import org.onosproject.core.GroupId;
 import org.onosproject.net.flow.DefaultTrafficTreatment;
 import org.onosproject.net.flow.TrafficTreatment;
@@ -36,7 +35,7 @@
  */
 public class GroupOperationTest {
 
-    private final GroupId groupId = new DefaultGroupId(6);
+    private final GroupId groupId = new GroupId(6);
     private final TrafficTreatment treatment =
             DefaultTrafficTreatment.emptyTreatment();
     private final GroupBucket bucket =
diff --git a/core/api/src/test/java/org/onosproject/net/intent/IntentTestsMocks.java b/core/api/src/test/java/org/onosproject/net/intent/IntentTestsMocks.java
index cef5b67..d812941 100644
--- a/core/api/src/test/java/org/onosproject/net/intent/IntentTestsMocks.java
+++ b/core/api/src/test/java/org/onosproject/net/intent/IntentTestsMocks.java
@@ -17,7 +17,6 @@
 
 import com.google.common.base.MoreObjects;
 import org.onlab.graph.Weight;
-import org.onosproject.core.DefaultGroupId;
 import org.onosproject.core.GroupId;
 import org.onosproject.net.DefaultPath;
 import org.onosproject.net.DeviceId;
@@ -347,7 +346,7 @@
 
         @Override
         public GroupId groupId() {
-            return new DefaultGroupId(0);
+            return new GroupId(0);
         }
 
         @Override
diff --git a/core/common/src/main/java/org/onosproject/codec/impl/DecodeInstructionCodecHelper.java b/core/common/src/main/java/org/onosproject/codec/impl/DecodeInstructionCodecHelper.java
index 2917afd..bd9d535 100644
--- a/core/common/src/main/java/org/onosproject/codec/impl/DecodeInstructionCodecHelper.java
+++ b/core/common/src/main/java/org/onosproject/codec/impl/DecodeInstructionCodecHelper.java
@@ -28,7 +28,6 @@
 import org.onlab.util.HexString;
 import org.onosproject.codec.CodecContext;
 import org.onosproject.codec.ExtensionTreatmentCodec;
-import org.onosproject.core.DefaultGroupId;
 import org.onosproject.core.GroupId;
 import org.onosproject.net.ChannelSpacing;
 import org.onosproject.net.Device;
@@ -355,7 +354,7 @@
             return Instructions.transition(nullIsIllegal(json.get(InstructionCodec.TABLE_ID),
                     InstructionCodec.TABLE_ID + InstructionCodec.MISSING_MEMBER_MESSAGE).asInt());
         } else if (type.equals(Instruction.Type.GROUP.name())) {
-            GroupId groupId = new DefaultGroupId(nullIsIllegal(json.get(InstructionCodec.GROUP_ID),
+            GroupId groupId = new GroupId(nullIsIllegal(json.get(InstructionCodec.GROUP_ID),
                     InstructionCodec.GROUP_ID + InstructionCodec.MISSING_MEMBER_MESSAGE).asInt());
             return Instructions.createGroup(groupId);
         } else if (type.equals(Instruction.Type.METER.name())) {
diff --git a/core/common/src/main/java/org/onosproject/codec/impl/GroupBucketCodec.java b/core/common/src/main/java/org/onosproject/codec/impl/GroupBucketCodec.java
index 73b8edf..079c5c7 100644
--- a/core/common/src/main/java/org/onosproject/codec/impl/GroupBucketCodec.java
+++ b/core/common/src/main/java/org/onosproject/codec/impl/GroupBucketCodec.java
@@ -18,7 +18,6 @@
 import com.fasterxml.jackson.databind.node.ObjectNode;
 import org.onosproject.codec.CodecContext;
 import org.onosproject.codec.JsonCodec;
-import org.onosproject.core.DefaultGroupId;
 import org.onosproject.core.GroupId;
 import org.onosproject.net.PortNumber;
 import org.onosproject.net.flow.TrafficTreatment;
@@ -111,7 +110,7 @@
                 // parse watchGroup
                 int groupIdInt = nullIsIllegal(json.get(WATCH_GROUP),
                         WATCH_GROUP + MISSING_MEMBER_MESSAGE).asInt();
-                GroupId watchGroup = new DefaultGroupId((short) groupIdInt);
+                GroupId watchGroup = new GroupId((short) groupIdInt);
 
                 groupBucket =
                         DefaultGroupBucket.createFailoverGroupBucket(trafficTreatment, watchPort, watchGroup);
diff --git a/core/common/src/test/java/org/onosproject/codec/impl/GroupCodecTest.java b/core/common/src/test/java/org/onosproject/codec/impl/GroupCodecTest.java
index 9037dcc..f868d84 100644
--- a/core/common/src/test/java/org/onosproject/codec/impl/GroupCodecTest.java
+++ b/core/common/src/test/java/org/onosproject/codec/impl/GroupCodecTest.java
@@ -22,7 +22,7 @@
 import org.junit.Test;
 import org.onosproject.codec.JsonCodec;
 import org.onosproject.core.CoreService;
-import org.onosproject.core.DefaultGroupId;
+import org.onosproject.core.GroupId;
 import org.onosproject.net.NetTestTools;
 import org.onosproject.net.PortNumber;
 import org.onosproject.net.flow.DefaultTrafficTreatment;
@@ -84,12 +84,12 @@
         GroupBuckets bucketsIndirect = new GroupBuckets(ImmutableList.of(bucket2));
 
         DefaultGroup group = new DefaultGroup(
-                new DefaultGroupId(1),
+                new GroupId(1),
                 NetTestTools.did("d1"),
                 ALL,
                 buckets);
         DefaultGroup group1 = new DefaultGroup(
-                new DefaultGroupId(2),
+                new GroupId(2),
                 NetTestTools.did("d2"),
                 INDIRECT,
                 bucketsIndirect);
diff --git a/core/common/src/test/java/org/onosproject/store/trivial/SimpleGroupStore.java b/core/common/src/test/java/org/onosproject/store/trivial/SimpleGroupStore.java
index 42a6d56..f3f0bd7 100644
--- a/core/common/src/test/java/org/onosproject/store/trivial/SimpleGroupStore.java
+++ b/core/common/src/test/java/org/onosproject/store/trivial/SimpleGroupStore.java
@@ -33,7 +33,6 @@
 import org.apache.felix.scr.annotations.Component;
 import org.apache.felix.scr.annotations.Deactivate;
 import org.apache.felix.scr.annotations.Service;
-import org.onosproject.core.DefaultGroupId;
 import org.onosproject.core.GroupId;
 import org.onosproject.net.DeviceId;
 import org.onosproject.net.group.DefaultGroup;
@@ -69,7 +68,7 @@
     private final Logger log = getLogger(getClass());
 
     private final int dummyId = 0xffffffff;
-    private final GroupId dummyGroupId = new DefaultGroupId(dummyId);
+    private final GroupId dummyGroupId = new GroupId(dummyId);
 
     // inner Map is per device group table
     private final ConcurrentMap<DeviceId, ConcurrentMap<GroupKey, StoredGroupEntry>>
@@ -192,13 +191,13 @@
         while (true) {
             Group existing = (
                     groupEntriesById.get(deviceId) != null) ?
-                    groupEntriesById.get(deviceId).get(new DefaultGroupId(freeId)) :
+                    groupEntriesById.get(deviceId).get(new GroupId(freeId)) :
                     null;
             if (existing == null) {
                 existing = (
                         extraneousGroupEntriesById.get(deviceId) != null) ?
                         extraneousGroupEntriesById.get(deviceId).
-                        get(new DefaultGroupId(freeId)) :
+                        get(new GroupId(freeId)) :
                         null;
             }
             if (existing != null) {
@@ -246,9 +245,9 @@
         GroupId id = null;
         if (groupDesc.givenGroupId() == null) {
             // Get a new group identifier
-            id = new DefaultGroupId(getFreeGroupIdValue(groupDesc.deviceId()));
+            id = new GroupId(getFreeGroupIdValue(groupDesc.deviceId()));
         } else {
-            id = new DefaultGroupId(groupDesc.givenGroupId());
+            id = new GroupId(groupDesc.givenGroupId());
         }
         // Create a group entry object
         StoredGroupEntry group = new DefaultGroup(id, groupDesc);
diff --git a/core/net/src/test/java/org/onosproject/net/group/impl/GroupManagerTest.java b/core/net/src/test/java/org/onosproject/net/group/impl/GroupManagerTest.java
index cee9823..a85046b 100644
--- a/core/net/src/test/java/org/onosproject/net/group/impl/GroupManagerTest.java
+++ b/core/net/src/test/java/org/onosproject/net/group/impl/GroupManagerTest.java
@@ -27,7 +27,6 @@
 import org.onosproject.common.event.impl.TestEventDispatcher;
 import org.onosproject.core.ApplicationId;
 import org.onosproject.core.DefaultApplicationId;
-import org.onosproject.core.DefaultGroupId;
 import org.onosproject.core.GroupId;
 import org.onosproject.net.AnnotationKeys;
 import org.onosproject.net.DefaultAnnotations;
@@ -344,11 +343,11 @@
                 PortNumber.portNumber(32)};
         PortNumber[] ports2 = {PortNumber.portNumber(41),
                 PortNumber.portNumber(42)};
-        GroupId gId1 = new DefaultGroupId(1);
+        GroupId gId1 = new GroupId(1);
         Group group1 = createSouthboundGroupEntry(gId1,
                                                   Arrays.asList(ports1),
                                                   0, deviceId);
-        GroupId gId2 = new DefaultGroupId(2);
+        GroupId gId2 = new GroupId(2);
         // Non zero reference count will make the group manager to queue
         // the extraneous groups until reference count is zero.
         Group group2 = createSouthboundGroupEntry(gId2,
@@ -384,11 +383,11 @@
                 PortNumber.portNumber(32)};
         PortNumber[] ports2 = {PortNumber.portNumber(41),
                 PortNumber.portNumber(42)};
-        GroupId gId1 = new DefaultGroupId(1);
+        GroupId gId1 = new GroupId(1);
         Group group1 = createSouthboundGroupEntry(gId1,
                                                   Arrays.asList(ports1),
                                                   0, deviceId);
-        GroupId gId2 = new DefaultGroupId(2);
+        GroupId gId2 = new GroupId(2);
         Group group2 = createSouthboundGroupEntry(gId2,
                                                   Arrays.asList(ports2),
                                                   0, deviceId);
@@ -601,11 +600,11 @@
         groupService.addGroup(newGroupDesc);
 
         // Test initial group audit process
-        GroupId gId1 = new DefaultGroupId(1);
+        GroupId gId1 = new GroupId(1);
         Group group1 = createSouthboundGroupEntry(gId1,
                                                   Arrays.asList(ports1),
                                                   0, deviceId);
-        GroupId gId2 = new DefaultGroupId(2);
+        GroupId gId2 = new GroupId(2);
         // Non zero reference count will make the group manager to queue
         // the extraneous groups until reference count is zero.
         Group group2 = createSouthboundGroupEntry(gId2,
diff --git a/core/store/dist/src/main/java/org/onosproject/store/group/impl/DistributedGroupStore.java b/core/store/dist/src/main/java/org/onosproject/store/group/impl/DistributedGroupStore.java
index 5fea69a..61c70ba 100644
--- a/core/store/dist/src/main/java/org/onosproject/store/group/impl/DistributedGroupStore.java
+++ b/core/store/dist/src/main/java/org/onosproject/store/group/impl/DistributedGroupStore.java
@@ -31,7 +31,6 @@
 import org.onosproject.cfg.ComponentConfigService;
 import org.onosproject.cluster.ClusterService;
 import org.onosproject.cluster.NodeId;
-import org.onosproject.core.DefaultGroupId;
 import org.onosproject.core.GroupId;
 import org.onosproject.mastership.MastershipService;
 import org.onosproject.net.DeviceId;
@@ -113,7 +112,7 @@
     private static final int GC_THRESH = 6;
 
     private final int dummyId = 0xffffffff;
-    private final GroupId dummyGroupId = new DefaultGroupId(dummyId);
+    private final GroupId dummyGroupId = new GroupId(dummyId);
 
     @Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
     protected ClusterCommunicationService clusterCommunicator;
@@ -387,12 +386,12 @@
         int freeId = groupIdGen.incrementAndGet();
 
         while (true) {
-            Group existing = getGroup(deviceId, new DefaultGroupId(freeId));
+            Group existing = getGroup(deviceId, new GroupId(freeId));
             if (existing == null) {
                 existing = (
                         extraneousGroupEntriesById.get(deviceId) != null) ?
                         extraneousGroupEntriesById.get(deviceId).
-                                get(new DefaultGroupId(freeId)) :
+                                get(new GroupId(freeId)) :
                         null;
             }
             if (existing != null) {
@@ -468,7 +467,7 @@
         if (extraneousMap == null) {
             return null;
         }
-        return extraneousMap.get(new DefaultGroupId(groupId));
+        return extraneousMap.get(new GroupId(groupId));
     }
 
     private Group getMatchingExtraneousGroupbyBuckets(DeviceId deviceId,
@@ -599,12 +598,12 @@
         GroupId id = null;
         if (groupDesc.givenGroupId() == null) {
             // Get a new group identifier
-            id = new DefaultGroupId(getFreeGroupIdValue(groupDesc.deviceId()));
+            id = new GroupId(getFreeGroupIdValue(groupDesc.deviceId()));
         } else {
             // we need to use the identifier passed in by caller, but check if
             // already used
             Group existing = getGroup(groupDesc.deviceId(),
-                                      new DefaultGroupId(groupDesc.givenGroupId()));
+                                      new GroupId(groupDesc.givenGroupId()));
             if (existing != null) {
                 log.warn("Group already exists with the same id: 0x{} in dev:{} "
                                  + "but with different key: {} (request gkey: {})",
@@ -614,7 +613,7 @@
                          groupDesc.appCookie());
                 return;
             }
-            id = new DefaultGroupId(groupDesc.givenGroupId());
+            id = new GroupId(groupDesc.givenGroupId());
         }
         // Create a group entry object
         StoredGroupEntry group = new DefaultGroup(id, groupDesc);
diff --git a/core/store/dist/src/test/java/org/onosproject/store/group/impl/DistributedGroupStoreTest.java b/core/store/dist/src/test/java/org/onosproject/store/group/impl/DistributedGroupStoreTest.java
index e9cebef..1e53cfb0 100644
--- a/core/store/dist/src/test/java/org/onosproject/store/group/impl/DistributedGroupStoreTest.java
+++ b/core/store/dist/src/test/java/org/onosproject/store/group/impl/DistributedGroupStoreTest.java
@@ -25,7 +25,6 @@
 import org.onlab.junit.TestUtils;
 import org.onosproject.cfg.ComponentConfigAdapter;
 import org.onosproject.cluster.NodeId;
-import org.onosproject.core.DefaultGroupId;
 import org.onosproject.core.GroupId;
 import org.onosproject.mastership.MastershipServiceAdapter;
 import org.onosproject.net.DeviceId;
@@ -72,9 +71,9 @@
 
     DeviceId deviceId1 = did("dev1");
     DeviceId deviceId2 = did("dev2");
-    GroupId groupId1 = new DefaultGroupId(1);
-    GroupId groupId2 = new DefaultGroupId(2);
-    GroupId groupId3 = new DefaultGroupId(3);
+    GroupId groupId1 = new GroupId(1);
+    GroupId groupId2 = new GroupId(2);
+    GroupId groupId3 = new GroupId(3);
     GroupKey groupKey1 = new DefaultGroupKey("abc".getBytes());
     GroupKey groupKey2 = new DefaultGroupKey("def".getBytes());
     GroupKey groupKey3 = new DefaultGroupKey("ghi".getBytes());
diff --git a/core/store/serializers/src/main/java/org/onosproject/store/serializers/KryoNamespaces.java b/core/store/serializers/src/main/java/org/onosproject/store/serializers/KryoNamespaces.java
index ec53007..dd3ef19 100644
--- a/core/store/serializers/src/main/java/org/onosproject/store/serializers/KryoNamespaces.java
+++ b/core/store/serializers/src/main/java/org/onosproject/store/serializers/KryoNamespaces.java
@@ -49,7 +49,7 @@
 import org.onosproject.core.ApplicationRole;
 import org.onosproject.core.DefaultApplication;
 import org.onosproject.core.DefaultApplicationId;
-import org.onosproject.core.DefaultGroupId;
+import org.onosproject.core.GroupId;
 import org.onosproject.core.Version;
 import org.onosproject.event.Change;
 import org.onosproject.incubator.net.domain.IntentDomainId;
@@ -536,7 +536,7 @@
             .register(MapEvent.Type.class)
             .register(SetEvent.class)
             .register(SetEvent.Type.class)
-            .register(DefaultGroupId.class)
+            .register(GroupId.class)
             .register(Annotations.class)
             .register(OmsPort.class)
             .register(OchPort.class)
diff --git a/core/store/serializers/src/test/java/org/onosproject/store/serializers/KryoSerializerTest.java b/core/store/serializers/src/test/java/org/onosproject/store/serializers/KryoSerializerTest.java
index cd2b765..f68d0e0 100644
--- a/core/store/serializers/src/test/java/org/onosproject/store/serializers/KryoSerializerTest.java
+++ b/core/store/serializers/src/test/java/org/onosproject/store/serializers/KryoSerializerTest.java
@@ -30,7 +30,7 @@
 import org.onosproject.cluster.NodeId;
 import org.onosproject.cluster.RoleInfo;
 import org.onosproject.core.DefaultApplicationId;
-import org.onosproject.core.DefaultGroupId;
+import org.onosproject.core.GroupId;
 import org.onosproject.mastership.MastershipTerm;
 import org.onosproject.net.Annotations;
 import org.onosproject.net.ChannelSpacing;
@@ -407,8 +407,8 @@
     }
 
     @Test
-    public void testDefaultGroupId() {
-        testSerializedEquals(new DefaultGroupId(99));
+    public void testGroupId() {
+        testSerializedEquals(new GroupId(99));
     }
 
     @Test
diff --git a/drivers/default/src/main/java/org/onosproject/driver/pipeline/CpqdOfdpa2GroupHandler.java b/drivers/default/src/main/java/org/onosproject/driver/pipeline/CpqdOfdpa2GroupHandler.java
index 7488b32..8c07dea 100644
--- a/drivers/default/src/main/java/org/onosproject/driver/pipeline/CpqdOfdpa2GroupHandler.java
+++ b/drivers/default/src/main/java/org/onosproject/driver/pipeline/CpqdOfdpa2GroupHandler.java
@@ -19,7 +19,7 @@
 import org.onlab.packet.MacAddress;
 import org.onlab.packet.VlanId;
 import org.onosproject.core.ApplicationId;
-import org.onosproject.core.DefaultGroupId;
+import org.onosproject.core.GroupId;
 import org.onosproject.net.flow.DefaultTrafficTreatment;
 import org.onosproject.net.flow.TrafficSelector;
 import org.onosproject.net.flow.TrafficTreatment;
@@ -148,7 +148,7 @@
             int mplsgroupId = MPLS_INTERFACE_TYPE | (SUBTYPE_MASK & mplsInterfaceIndex);
             final GroupKey mplsgroupkey = new DefaultGroupKey(
                     Ofdpa2Pipeline.appKryo.serialize(mplsInterfaceIndex));
-            outerTtb.group(new DefaultGroupId(l2groupId));
+            outerTtb.group(new GroupId(l2groupId));
             // create the mpls-interface group description to wait for the
             // l2 interface group to be processed
             GroupBucket mplsinterfaceGroupBucket =
@@ -170,7 +170,7 @@
             int l3groupId = L3_UNICAST_TYPE | (TYPE_MASK & l3unicastIndex);
             final GroupKey l3groupkey = new DefaultGroupKey(
                     Ofdpa2Pipeline.appKryo.serialize(l3unicastIndex));
-            outerTtb.group(new DefaultGroupId(l2groupId));
+            outerTtb.group(new GroupId(l2groupId));
             // create the l3unicast group description to wait for the
             // l2 interface group to be processed
             GroupBucket l3unicastGroupBucket =
@@ -237,7 +237,7 @@
             for (GroupInfo gi : unsentGroups) {
                 // create ECMP bucket to point to the outer group
                 TrafficTreatment.Builder ttb = DefaultTrafficTreatment.builder();
-                ttb.group(new DefaultGroupId(gi.getNextGroupDesc().givenGroupId()));
+                ttb.group(new GroupId(gi.getNextGroupDesc().givenGroupId()));
                 GroupBucket sbucket = DefaultGroupBucket
                         .createSelectGroupBucket(ttb.build());
                 mplsEcmpGroupBuckets.add(sbucket);
diff --git a/drivers/default/src/main/java/org/onosproject/driver/pipeline/CpqdOfdpa2Pipeline.java b/drivers/default/src/main/java/org/onosproject/driver/pipeline/CpqdOfdpa2Pipeline.java
index 58ba6d6..45f1c90 100644
--- a/drivers/default/src/main/java/org/onosproject/driver/pipeline/CpqdOfdpa2Pipeline.java
+++ b/drivers/default/src/main/java/org/onosproject/driver/pipeline/CpqdOfdpa2Pipeline.java
@@ -21,7 +21,7 @@
 import org.onlab.packet.IpPrefix;
 import org.onlab.packet.VlanId;
 import org.onosproject.core.ApplicationId;
-import org.onosproject.core.DefaultGroupId;
+import org.onosproject.core.GroupId;
 import org.onosproject.net.Port;
 import org.onosproject.net.PortNumber;
 import org.onosproject.net.behaviour.NextGroup;
@@ -366,7 +366,7 @@
                 .matchInPort(portNumber)
                 .matchVlanId(assignedVlan);
         TrafficTreatment.Builder tbuilder = DefaultTrafficTreatment.builder()
-                .group(new DefaultGroupId(POP_VLAN_PUNT_GROUP_ID));
+                .group(new GroupId(POP_VLAN_PUNT_GROUP_ID));
 
         return DefaultFlowRule.builder()
                 .forDevice(deviceId)
diff --git a/drivers/default/src/main/java/org/onosproject/driver/pipeline/Ofdpa2GroupHandler.java b/drivers/default/src/main/java/org/onosproject/driver/pipeline/Ofdpa2GroupHandler.java
index 2bb2dd6..0535ca3 100644
--- a/drivers/default/src/main/java/org/onosproject/driver/pipeline/Ofdpa2GroupHandler.java
+++ b/drivers/default/src/main/java/org/onosproject/driver/pipeline/Ofdpa2GroupHandler.java
@@ -28,7 +28,6 @@
 import org.onlab.packet.MplsLabel;
 import org.onlab.packet.VlanId;
 import org.onosproject.core.ApplicationId;
-import org.onosproject.core.DefaultGroupId;
 import org.onosproject.core.GroupId;
 import org.onosproject.driver.extensions.OfdpaSetVlanVid;
 import org.onosproject.net.DeviceId;
@@ -529,7 +528,7 @@
             int mplsgroupId = MPLS_INTERFACE_TYPE | (SUBTYPE_MASK & mplsInterfaceIndex);
             final GroupKey mplsgroupkey = new DefaultGroupKey(
                                Ofdpa2Pipeline.appKryo.serialize(mplsInterfaceIndex));
-            outerTtb.group(new DefaultGroupId(l2groupId));
+            outerTtb.group(new GroupId(l2groupId));
             // create the mpls-interface group description to wait for the
             // l2 interface group to be processed
             GroupBucket mplsinterfaceGroupBucket =
@@ -551,7 +550,7 @@
             int l3groupId = L3_UNICAST_TYPE | (TYPE_MASK & l3unicastIndex);
             final GroupKey l3groupkey = new DefaultGroupKey(
                                Ofdpa2Pipeline.appKryo.serialize(l3unicastIndex));
-            outerTtb.group(new DefaultGroupId(l2groupId));
+            outerTtb.group(new GroupId(l2groupId));
             // create the l3unicast group description to wait for the
             // l2 interface group to be processed
             GroupBucket l3unicastGroupBucket =
@@ -751,7 +750,7 @@
             GroupDescription nextGroupDesc = (groupInfo.nextGroupDesc != null) ?
                     groupInfo.nextGroupDesc : groupInfo.innerMostGroupDesc;
             TrafficTreatment.Builder ttb = DefaultTrafficTreatment.builder();
-            ttb.group(new DefaultGroupId(nextGroupDesc.givenGroupId()));
+            ttb.group(new GroupId(nextGroupDesc.givenGroupId()));
             GroupBucket abucket = DefaultGroupBucket.createAllGroupBucket(ttb.build());
             l3McastBuckets.add(abucket);
         });
@@ -830,7 +829,7 @@
         for (GroupInfo gi : unsentGroups) {
             // create ECMP bucket to point to the outer group
             TrafficTreatment.Builder ttb = DefaultTrafficTreatment.builder();
-            ttb.group(new DefaultGroupId(gi.nextGroupDesc.givenGroupId()));
+            ttb.group(new GroupId(gi.nextGroupDesc.givenGroupId()));
             GroupBucket sbucket = DefaultGroupBucket
                     .createSelectGroupBucket(ttb.build());
             l3ecmpGroupBuckets.add(sbucket);
@@ -957,7 +956,7 @@
                 }
                 l3vpnTtb.pushMpls()
                         .setMpls(innermostLabel)
-                        .group(new DefaultGroupId(onelabelGroupInfo.nextGroupDesc.givenGroupId()));
+                        .group(new GroupId(onelabelGroupInfo.nextGroupDesc.givenGroupId()));
                 if (supportCopyTtl()) {
                     l3vpnTtb.copyTtlOut();
                 }
@@ -1279,7 +1278,7 @@
         groupInfos.forEach(groupInfo -> {
             GroupDescription groupDesc = groupInfo.nextGroupDesc;
             TrafficTreatment.Builder treatmentBuilder = DefaultTrafficTreatment.builder();
-            treatmentBuilder.group(new DefaultGroupId(groupDesc.givenGroupId()));
+            treatmentBuilder.group(new GroupId(groupDesc.givenGroupId()));
             GroupBucket newBucket = null;
             switch (bucketType) {
                 case ALL:
@@ -1322,7 +1321,7 @@
             GroupDescription nextGroupDesc = (groupInfo.nextGroupDesc != null) ?
                     groupInfo.nextGroupDesc : groupInfo.innerMostGroupDesc;
             TrafficTreatment.Builder treatmentBuidler = DefaultTrafficTreatment.builder();
-            treatmentBuidler.group(new DefaultGroupId(nextGroupDesc.givenGroupId()));
+            treatmentBuidler.group(new GroupId(nextGroupDesc.givenGroupId()));
             GroupBucket newBucket = DefaultGroupBucket.createAllGroupBucket(treatmentBuidler.build());
             newBuckets.add(newBucket);
         });
diff --git a/drivers/default/src/main/java/org/onosproject/driver/pipeline/Ofdpa3GroupHandler.java b/drivers/default/src/main/java/org/onosproject/driver/pipeline/Ofdpa3GroupHandler.java
index 1c30333..ca7e085 100644
--- a/drivers/default/src/main/java/org/onosproject/driver/pipeline/Ofdpa3GroupHandler.java
+++ b/drivers/default/src/main/java/org/onosproject/driver/pipeline/Ofdpa3GroupHandler.java
@@ -19,7 +19,7 @@
 import com.google.common.collect.Lists;
 import org.onlab.packet.VlanId;
 import org.onosproject.core.ApplicationId;
-import org.onosproject.core.DefaultGroupId;
+import org.onosproject.core.GroupId;
 import org.onosproject.driver.extensions.Ofdpa3PushCw;
 import org.onosproject.driver.extensions.Ofdpa3PushL2Header;
 import org.onosproject.net.flow.DefaultTrafficTreatment;
@@ -231,7 +231,7 @@
         // We add all the instructions.
         instructions.forEach(treatment::add);
         // We point the group to the next group.
-        treatment.group(new DefaultGroupId(nextGroupId));
+        treatment.group(new GroupId(nextGroupId));
         GroupBucket groupBucket = DefaultGroupBucket
                 .createIndirectGroupBucket(treatment.build());
         // Finally we build the group description.
@@ -269,7 +269,7 @@
         instructions.forEach(treatment::add);
         treatment.extension(new Ofdpa3PushCw(), deviceId);
         // We point the group to the next group.
-        treatment.group(new DefaultGroupId(nextGroupId));
+        treatment.group(new GroupId(nextGroupId));
         GroupBucket groupBucket = DefaultGroupBucket
                 .createIndirectGroupBucket(treatment.build());
         // Finally we build the group description.
diff --git a/incubator/api/src/main/java/org/onosproject/incubator/net/tunnel/DefaultTunnel.java b/incubator/api/src/main/java/org/onosproject/incubator/net/tunnel/DefaultTunnel.java
index c533cf9..10a1c2b 100644
--- a/incubator/api/src/main/java/org/onosproject/incubator/net/tunnel/DefaultTunnel.java
+++ b/incubator/api/src/main/java/org/onosproject/incubator/net/tunnel/DefaultTunnel.java
@@ -20,7 +20,7 @@
 import java.util.Objects;
 
 import com.google.common.annotations.Beta;
-import org.onosproject.core.DefaultGroupId;
+import org.onosproject.core.GroupId;
 import org.onosproject.net.AbstractModel;
 import org.onosproject.net.Annotations;
 import org.onosproject.net.NetworkResource;
@@ -38,7 +38,7 @@
     private final TunnelEndPoint dst; // a destination point of tunnel.
     private final State state;
     private final Type type; // tunnel type
-    private final DefaultGroupId groupId; // represent for a group flow table
+    private final GroupId groupId; // represent for a group flow table
     // which a tunnel match up
     // tunnel producer
     private final TunnelId tunnelId; // tunnel identify generated by
@@ -61,7 +61,7 @@
      * @param annotations optional key/value annotations
      */
     public DefaultTunnel(ProviderId producerName, TunnelEndPoint src,
-                         TunnelEndPoint dst, Type type, DefaultGroupId groupId,
+                         TunnelEndPoint dst, Type type, GroupId groupId,
                          TunnelId tunnelId, TunnelName tunnelName, Path path,
                          Annotations... annotations) {
         this(producerName, src, dst, type, Tunnel.State.ACTIVE, groupId,
@@ -84,7 +84,7 @@
      */
     public DefaultTunnel(ProviderId producerName, TunnelEndPoint src,
                          TunnelEndPoint dst, Type type, State state,
-                         DefaultGroupId groupId, TunnelId tunnelId,
+                         GroupId groupId, TunnelId tunnelId,
                          TunnelName tunnelName, Path path, Annotations... annotations) {
         super(producerName, annotations);
         this.src = src;
@@ -113,7 +113,7 @@
      * @param annotations optional key/value annotations
      */
     public DefaultTunnel(ProviderId producerName, TunnelEndPoint src,
-                         TunnelEndPoint dst, Type type, DefaultGroupId groupId,
+                         TunnelEndPoint dst, Type type, GroupId groupId,
                          TunnelId tunnelId, TunnelName tunnelName, Path path,
                          NetworkResource networkRes, Annotations... annotations) {
         this(producerName, src, dst, type, Tunnel.State.ACTIVE, groupId,
@@ -137,7 +137,7 @@
      */
     public DefaultTunnel(ProviderId producerName, TunnelEndPoint src,
                          TunnelEndPoint dst, Type type, State state,
-                         DefaultGroupId groupId, TunnelId tunnelId,
+                         GroupId groupId, TunnelId tunnelId,
                          TunnelName tunnelName, Path path, NetworkResource networkRes,
                          Annotations... annotations) {
         super(producerName, annotations);
@@ -183,7 +183,7 @@
     }
 
     @Override
-    public DefaultGroupId groupId() {
+    public GroupId groupId() {
         return groupId;
     }
 
diff --git a/incubator/api/src/main/java/org/onosproject/incubator/net/tunnel/DefaultTunnelDescription.java b/incubator/api/src/main/java/org/onosproject/incubator/net/tunnel/DefaultTunnelDescription.java
index 62f7646..0af06de 100644
--- a/incubator/api/src/main/java/org/onosproject/incubator/net/tunnel/DefaultTunnelDescription.java
+++ b/incubator/api/src/main/java/org/onosproject/incubator/net/tunnel/DefaultTunnelDescription.java
@@ -16,7 +16,7 @@
 package org.onosproject.incubator.net.tunnel;
 
 import com.google.common.annotations.Beta;
-import org.onosproject.core.DefaultGroupId;
+import org.onosproject.core.GroupId;
 import org.onosproject.net.AbstractDescription;
 import org.onosproject.net.NetworkResource;
 import org.onosproject.net.Path;
@@ -36,7 +36,7 @@
     private final TunnelEndPoint src;
     private final TunnelEndPoint dst;
     private final Tunnel.Type type;
-    private final DefaultGroupId groupId; // represent for a group flow table
+    private final GroupId groupId; // represent for a group flow table
     // which a tunnel match up
     // tunnel producer
     private final ProviderId producerName; // tunnel producer name
@@ -59,7 +59,7 @@
      */
     public DefaultTunnelDescription(TunnelId id, TunnelEndPoint src,
                                     TunnelEndPoint dst, Tunnel.Type type,
-                                    DefaultGroupId groupId,
+                                    GroupId groupId,
                                     ProviderId producerName,
                                     TunnelName tunnelName,
                                     Path path,
@@ -92,7 +92,7 @@
      */
     public DefaultTunnelDescription(TunnelId id, TunnelEndPoint src,
                                     TunnelEndPoint dst, Tunnel.Type type,
-                                    DefaultGroupId groupId,
+                                    GroupId groupId,
                                     ProviderId producerName,
                                     TunnelName tunnelName,
                                     Path path,
@@ -131,7 +131,7 @@
     }
 
     @Override
-    public DefaultGroupId groupId() {
+    public GroupId groupId() {
         return groupId;
     }
 
diff --git a/incubator/api/src/main/java/org/onosproject/incubator/net/tunnel/Tunnel.java b/incubator/api/src/main/java/org/onosproject/incubator/net/tunnel/Tunnel.java
index 3f6572f..28d2429 100644
--- a/incubator/api/src/main/java/org/onosproject/incubator/net/tunnel/Tunnel.java
+++ b/incubator/api/src/main/java/org/onosproject/incubator/net/tunnel/Tunnel.java
@@ -16,7 +16,7 @@
 package org.onosproject.incubator.net.tunnel;
 
 import com.google.common.annotations.Beta;
-import org.onosproject.core.DefaultGroupId;
+import org.onosproject.core.GroupId;
 import org.onosproject.net.Annotated;
 import org.onosproject.net.NetworkResource;
 import org.onosproject.net.Path;
@@ -138,7 +138,7 @@
      *
      * @return OpenFlowGroupId
      */
-    DefaultGroupId groupId();
+    GroupId groupId();
 
     /**
      * Returns tunnel identify generated by ONOS as primary key.
diff --git a/incubator/api/src/main/java/org/onosproject/incubator/net/tunnel/TunnelDescription.java b/incubator/api/src/main/java/org/onosproject/incubator/net/tunnel/TunnelDescription.java
index fd73846..0d05494 100644
--- a/incubator/api/src/main/java/org/onosproject/incubator/net/tunnel/TunnelDescription.java
+++ b/incubator/api/src/main/java/org/onosproject/incubator/net/tunnel/TunnelDescription.java
@@ -16,7 +16,7 @@
 package org.onosproject.incubator.net.tunnel;
 
 import com.google.common.annotations.Beta;
-import org.onosproject.core.DefaultGroupId;
+import org.onosproject.core.GroupId;
 import org.onosproject.incubator.net.tunnel.Tunnel.Type;
 import org.onosproject.net.Annotated;
 import org.onosproject.net.Description;
@@ -63,7 +63,7 @@
      *
      * @return OpenFlowGroupId
      */
-    DefaultGroupId groupId();
+    GroupId groupId();
 
     /**
      * Returns tunnel producer name.
diff --git a/incubator/api/src/test/java/org/onosproject/incubator/net/tunnel/DefaultTunnelTest.java b/incubator/api/src/test/java/org/onosproject/incubator/net/tunnel/DefaultTunnelTest.java
index e9aa30c..b0349fd 100644
--- a/incubator/api/src/test/java/org/onosproject/incubator/net/tunnel/DefaultTunnelTest.java
+++ b/incubator/api/src/test/java/org/onosproject/incubator/net/tunnel/DefaultTunnelTest.java
@@ -19,7 +19,7 @@
 
 import org.junit.Test;
 import org.onlab.packet.IpAddress;
-import org.onosproject.core.DefaultGroupId;
+import org.onosproject.core.GroupId;
 import org.onosproject.net.provider.ProviderId;
 
 import com.google.common.testing.EqualsTester;
@@ -42,7 +42,7 @@
                 .valueOf(23423));
         TunnelEndPoint dst = IpTunnelEndPoint.ipTunnelPoint(IpAddress
                 .valueOf(32421));
-        DefaultGroupId groupId = new DefaultGroupId(92034);
+        GroupId groupId = new GroupId(92034);
         TunnelName tunnelName = TunnelName.tunnelName("TunnelName");
         TunnelId tunnelId = TunnelId.valueOf("41654654");
         ProviderId producerName1 = new ProviderId("producer1", "13");
diff --git a/incubator/api/src/test/java/org/onosproject/incubator/net/tunnel/TunnelEventTest.java b/incubator/api/src/test/java/org/onosproject/incubator/net/tunnel/TunnelEventTest.java
index c38f755..7665188 100644
--- a/incubator/api/src/test/java/org/onosproject/incubator/net/tunnel/TunnelEventTest.java
+++ b/incubator/api/src/test/java/org/onosproject/incubator/net/tunnel/TunnelEventTest.java
@@ -22,7 +22,7 @@
 
 import org.junit.Test;
 import org.onlab.packet.IpAddress;
-import org.onosproject.core.DefaultGroupId;
+import org.onosproject.core.GroupId;
 import org.onosproject.net.provider.ProviderId;
 
 /**
@@ -46,7 +46,7 @@
                 .valueOf(23423));
         TunnelEndPoint dst = IpTunnelEndPoint.ipTunnelPoint(IpAddress
                 .valueOf(32421));
-        DefaultGroupId groupId = new DefaultGroupId(92034);
+        GroupId groupId = new GroupId(92034);
         TunnelName tunnelName = TunnelName.tunnelName("TunnelName");
         TunnelId tunnelId = TunnelId.valueOf("41654654");
         ProviderId producerName1 = new ProviderId("producer1", "13");
diff --git a/incubator/net/src/test/java/org/onosproject/incubator/net/virtual/impl/VirtualNetworkGroupManagerTest.java b/incubator/net/src/test/java/org/onosproject/incubator/net/virtual/impl/VirtualNetworkGroupManagerTest.java
index 7034358..757efe4 100644
--- a/incubator/net/src/test/java/org/onosproject/incubator/net/virtual/impl/VirtualNetworkGroupManagerTest.java
+++ b/incubator/net/src/test/java/org/onosproject/incubator/net/virtual/impl/VirtualNetworkGroupManagerTest.java
@@ -29,7 +29,6 @@
 import org.onosproject.common.event.impl.TestEventDispatcher;
 import org.onosproject.core.ApplicationId;
 import org.onosproject.core.CoreService;
-import org.onosproject.core.DefaultGroupId;
 import org.onosproject.core.GroupId;
 import org.onosproject.event.EventDeliveryService;
 import org.onosproject.incubator.net.virtual.NetworkId;
@@ -353,11 +352,11 @@
                 PortNumber.portNumber(32)};
         PortNumber[] ports2 = {PortNumber.portNumber(41),
                 PortNumber.portNumber(42)};
-        GroupId gId1 = new DefaultGroupId(1);
+        GroupId gId1 = new GroupId(1);
         Group group1 = createSouthboundGroupEntry(gId1,
                                                   Arrays.asList(ports1),
                                                   0, deviceId);
-        GroupId gId2 = new DefaultGroupId(2);
+        GroupId gId2 = new GroupId(2);
         // Non zero reference count will make the group manager to queue
         // the extraneous groups until reference count is zero.
         Group group2 = createSouthboundGroupEntry(gId2,
@@ -402,11 +401,11 @@
                 PortNumber.portNumber(32)};
         PortNumber[] ports2 = {PortNumber.portNumber(41),
                 PortNumber.portNumber(42)};
-        GroupId gId1 = new DefaultGroupId(1);
+        GroupId gId1 = new GroupId(1);
         Group group1 = createSouthboundGroupEntry(gId1,
                                                   Arrays.asList(ports1),
                                                   0, deviceId);
-        GroupId gId2 = new DefaultGroupId(2);
+        GroupId gId2 = new GroupId(2);
         Group group2 = createSouthboundGroupEntry(gId2,
                                                   Arrays.asList(ports2),
                                                   0, deviceId);
diff --git a/incubator/store/src/main/java/org/onosproject/incubator/store/virtual/impl/SimpleVirtualGroupStore.java b/incubator/store/src/main/java/org/onosproject/incubator/store/virtual/impl/SimpleVirtualGroupStore.java
index d1ba607..b6be85d 100644
--- a/incubator/store/src/main/java/org/onosproject/incubator/store/virtual/impl/SimpleVirtualGroupStore.java
+++ b/incubator/store/src/main/java/org/onosproject/incubator/store/virtual/impl/SimpleVirtualGroupStore.java
@@ -22,7 +22,6 @@
 import org.apache.felix.scr.annotations.Component;
 import org.apache.felix.scr.annotations.Deactivate;
 import org.apache.felix.scr.annotations.Service;
-import org.onosproject.core.DefaultGroupId;
 import org.onosproject.core.GroupId;
 import org.onosproject.incubator.net.virtual.NetworkId;
 import org.onosproject.incubator.net.virtual.VirtualNetworkGroupStore;
@@ -67,7 +66,7 @@
     private final Logger log = getLogger(getClass());
 
     private final int dummyId = 0xffffffff;
-    private final GroupId dummyGroupId = new DefaultGroupId(dummyId);
+    private final GroupId dummyGroupId = new GroupId(dummyId);
 
     // inner Map is per device group table
     private final ConcurrentMap<NetworkId,
@@ -198,14 +197,14 @@
             if (groupEntriesById.get(networkId) != null &&
                     groupEntriesById.get(networkId).get(deviceId) != null) {
                 existing = groupEntriesById.get(networkId).get(deviceId)
-                                .get(new DefaultGroupId(freeId));
+                                .get(new GroupId(freeId));
             }
 
             if (existing == null) {
                 if (extraneousGroupEntriesById.get(networkId) != null &&
                         extraneousGroupEntriesById.get(networkId).get(deviceId) != null) {
                     existing = extraneousGroupEntriesById.get(networkId).get(deviceId)
-                                    .get(new DefaultGroupId(freeId));
+                                    .get(new GroupId(freeId));
                 }
             }
 
@@ -251,9 +250,9 @@
         GroupId id = null;
         if (groupDesc.givenGroupId() == null) {
             // Get a new group identifier
-            id = new DefaultGroupId(getFreeGroupIdValue(networkId, groupDesc.deviceId()));
+            id = new GroupId(getFreeGroupIdValue(networkId, groupDesc.deviceId()));
         } else {
-            id = new DefaultGroupId(groupDesc.givenGroupId());
+            id = new GroupId(groupDesc.givenGroupId());
         }
         // Create a group entry object
         StoredGroupEntry group = new DefaultGroup(id, groupDesc);
diff --git a/protocols/pcep/ctl/src/test/java/org/onosproject/pcelabelstore/label/BasicPceccHandlerTest.java b/protocols/pcep/ctl/src/test/java/org/onosproject/pcelabelstore/label/BasicPceccHandlerTest.java
index aa8481e..b0662bd 100644
--- a/protocols/pcep/ctl/src/test/java/org/onosproject/pcelabelstore/label/BasicPceccHandlerTest.java
+++ b/protocols/pcep/ctl/src/test/java/org/onosproject/pcelabelstore/label/BasicPceccHandlerTest.java
@@ -28,7 +28,7 @@
 import org.junit.Before;
 import org.junit.Test;
 import org.onlab.packet.IpAddress;
-import org.onosproject.core.DefaultGroupId;
+import org.onosproject.core.GroupId;
 import org.onosproject.incubator.net.tunnel.Tunnel;
 import org.onosproject.incubator.net.tunnel.TunnelEndPoint;
 import org.onosproject.incubator.net.tunnel.IpTunnelEndPoint;
@@ -74,7 +74,7 @@
     protected PceLabelStore pceStore;
     private TunnelEndPoint src = IpTunnelEndPoint.ipTunnelPoint(IpAddress.valueOf(23423));
     private TunnelEndPoint dst = IpTunnelEndPoint.ipTunnelPoint(IpAddress.valueOf(32421));
-    private DefaultGroupId groupId = new DefaultGroupId(92034);
+    private GroupId groupId = new GroupId(92034);
     private TunnelName tunnelName = TunnelName.tunnelName("TunnelName");
     private TunnelId tunnelId = TunnelId.valueOf("41654654");
     private ProviderId producerName = new ProviderId("producer1", "13");
diff --git a/providers/openflow/flow/src/main/java/org/onosproject/provider/of/flow/util/FlowEntryBuilder.java b/providers/openflow/flow/src/main/java/org/onosproject/provider/of/flow/util/FlowEntryBuilder.java
index 76be182..0666cc5 100644
--- a/providers/openflow/flow/src/main/java/org/onosproject/provider/of/flow/util/FlowEntryBuilder.java
+++ b/providers/openflow/flow/src/main/java/org/onosproject/provider/of/flow/util/FlowEntryBuilder.java
@@ -25,7 +25,7 @@
 import org.onlab.packet.MplsLabel;
 import org.onlab.packet.TpPort;
 import org.onlab.packet.VlanId;
-import org.onosproject.core.DefaultGroupId;
+import org.onosproject.core.GroupId;
 import org.onosproject.net.DeviceId;
 import org.onosproject.net.Lambda;
 import org.onosproject.net.OduSignalId;
@@ -424,7 +424,7 @@
                     break;
                 case GROUP:
                     OFActionGroup group = (OFActionGroup) act;
-                    builder.group(new DefaultGroupId(group.getGroup().getGroupNumber()));
+                    builder.group(new GroupId(group.getGroup().getGroupNumber()));
                     break;
                 case SET_QUEUE:
                     OFActionSetQueue setQueue = (OFActionSetQueue) act;
diff --git a/providers/openflow/group/src/main/java/org/onosproject/provider/of/group/impl/GroupBucketEntryBuilder.java b/providers/openflow/group/src/main/java/org/onosproject/provider/of/group/impl/GroupBucketEntryBuilder.java
index c3114b8..e189144 100644
--- a/providers/openflow/group/src/main/java/org/onosproject/provider/of/group/impl/GroupBucketEntryBuilder.java
+++ b/providers/openflow/group/src/main/java/org/onosproject/provider/of/group/impl/GroupBucketEntryBuilder.java
@@ -16,7 +16,6 @@
 package org.onosproject.provider.of.group.impl;
 
 import com.google.common.collect.Lists;
-import org.onosproject.core.DefaultGroupId;
 import org.onosproject.core.GroupId;
 import org.onosproject.net.DeviceId;
 import org.onosproject.net.PortNumber;
@@ -95,7 +94,7 @@
                     PortNumber port =
                             PortNumber.portNumber(bucket.getWatchPort().getPortNumber());
                     GroupId groupId =
-                            new DefaultGroupId(bucket.getWatchGroup().getGroupNumber());
+                            new GroupId(bucket.getWatchGroup().getGroupNumber());
                     groupBucket =
                             DefaultGroupBucket.createFailoverGroupBucket(treatment,
                                     port, groupId);
diff --git a/providers/openflow/group/src/main/java/org/onosproject/provider/of/group/impl/OpenFlowGroupProvider.java b/providers/openflow/group/src/main/java/org/onosproject/provider/of/group/impl/OpenFlowGroupProvider.java
index 159b7dd..46abc77 100644
--- a/providers/openflow/group/src/main/java/org/onosproject/provider/of/group/impl/OpenFlowGroupProvider.java
+++ b/providers/openflow/group/src/main/java/org/onosproject/provider/of/group/impl/OpenFlowGroupProvider.java
@@ -31,7 +31,6 @@
 import org.apache.felix.scr.annotations.Deactivate;
 import org.apache.felix.scr.annotations.Reference;
 import org.apache.felix.scr.annotations.ReferenceCardinality;
-import org.onosproject.core.DefaultGroupId;
 import org.onosproject.core.GroupId;
 import org.onosproject.net.DeviceId;
 import org.onosproject.net.PortNumber;
@@ -191,7 +190,7 @@
                     return;
             }
             sw.sendMsg(groupMod);
-            GroupId groudId = new DefaultGroupId(groupMod.getGroup().getGroupNumber());
+            GroupId groudId = new GroupId(groupMod.getGroup().getGroupNumber());
             pendingGroupOperations.put(groudId, groupOperation);
             pendingXidMaps.put(groudId, groupModXid);
         }
@@ -245,7 +244,7 @@
 
         for (OFGroupDescStatsEntry entry: groupDescStatsReply.getEntries()) {
             int id = entry.getGroup().getGroupNumber();
-            GroupId groupId = new DefaultGroupId(id);
+            GroupId groupId = new GroupId(id);
             GroupDescription.Type type = getGroupType(entry.getGroupType());
             GroupBuckets buckets = new GroupBucketEntryBuilder(dpid, entry.getBuckets(),
                     entry.getGroupType(), driverService).build();
diff --git a/providers/openflow/group/src/test/java/org/onosproject/provider/of/group/impl/OpenFlowGroupProviderTest.java b/providers/openflow/group/src/test/java/org/onosproject/provider/of/group/impl/OpenFlowGroupProviderTest.java
index cd1e7bb..ba0634a 100644
--- a/providers/openflow/group/src/test/java/org/onosproject/provider/of/group/impl/OpenFlowGroupProviderTest.java
+++ b/providers/openflow/group/src/test/java/org/onosproject/provider/of/group/impl/OpenFlowGroupProviderTest.java
@@ -19,7 +19,6 @@
 import org.junit.After;
 import org.junit.Before;
 import org.junit.Test;
-import org.onosproject.core.DefaultGroupId;
 import org.onosproject.core.GroupId;
 import org.onosproject.net.Device;
 import org.onosproject.net.DeviceId;
@@ -92,7 +91,7 @@
     @Test
     public void addGroup() {
 
-        GroupId groupId = new DefaultGroupId(1);
+        GroupId groupId = new GroupId(1);
 
         List<GroupBucket> bucketList = Lists.newArrayList();
         TrafficTreatment.Builder builder = DefaultTrafficTreatment.builder();
@@ -123,7 +122,7 @@
         TestOpenFlowGroupProviderService testProviderService =
                 (TestOpenFlowGroupProviderService) providerService;
 
-        GroupId groupId = new DefaultGroupId(1);
+        GroupId groupId = new GroupId(1);
         List<GroupBucket> bucketList = Lists.newArrayList();
         TrafficTreatment.Builder builder = DefaultTrafficTreatment.builder();
         builder.setOutput(PortNumber.portNumber(1));
diff --git a/providers/ovsdb/tunnel/src/test/java/org/onosproject/ovsdb/provider/tunnel/OvsdbTunnelProviderTest.java b/providers/ovsdb/tunnel/src/test/java/org/onosproject/ovsdb/provider/tunnel/OvsdbTunnelProviderTest.java
index 566f535..4925c50 100644
--- a/providers/ovsdb/tunnel/src/test/java/org/onosproject/ovsdb/provider/tunnel/OvsdbTunnelProviderTest.java
+++ b/providers/ovsdb/tunnel/src/test/java/org/onosproject/ovsdb/provider/tunnel/OvsdbTunnelProviderTest.java
@@ -27,7 +27,7 @@
 import org.junit.Before;
 import org.junit.Test;
 import org.onlab.packet.IpAddress;
-import org.onosproject.core.DefaultGroupId;
+import org.onosproject.core.GroupId;
 import org.onosproject.incubator.net.tunnel.DefaultTunnelDescription;
 import org.onosproject.incubator.net.tunnel.IpTunnelEndPoint;
 import org.onosproject.incubator.net.tunnel.Tunnel;
@@ -91,7 +91,7 @@
                                                                 src,
                                                                 dst,
                                                                 Tunnel.Type.VXLAN,
-                                                                new DefaultGroupId(0),
+                                                                new GroupId(0),
                                                                 this.provider.id(),
                                                                 TunnelName.tunnelName("tunnel12"),
                                                                 new DefaultPath(this.provider.id(), links, 0.3),
@@ -116,7 +116,7 @@
                                                                 src,
                                                                 dst,
                                                                 Tunnel.Type.VXLAN,
-                                                                new DefaultGroupId(0),
+                                                                new GroupId(0),
                                                                 this.provider.id(),
                                                                 TunnelName.tunnelName("tunnel1"),
                                                                 new DefaultPath(this.provider.id(), links, 0.3),
diff --git a/providers/pcep/tunnel/src/main/java/org/onosproject/provider/pcep/tunnel/impl/PcepTunnelProvider.java b/providers/pcep/tunnel/src/main/java/org/onosproject/provider/pcep/tunnel/impl/PcepTunnelProvider.java
index a6d2763..446fe94 100644
--- a/providers/pcep/tunnel/src/main/java/org/onosproject/provider/pcep/tunnel/impl/PcepTunnelProvider.java
+++ b/providers/pcep/tunnel/src/main/java/org/onosproject/provider/pcep/tunnel/impl/PcepTunnelProvider.java
@@ -27,7 +27,7 @@
 import org.onlab.packet.Ip4Address;
 import org.onlab.packet.IpAddress;
 import org.onosproject.cfg.ComponentConfigService;
-import org.onosproject.core.DefaultGroupId;
+import org.onosproject.core.GroupId;
 import org.onosproject.incubator.net.resource.label.LabelResourceId;
 import org.onosproject.incubator.net.tunnel.DefaultLabelStack;
 import org.onosproject.incubator.net.tunnel.DefaultOpticalTunnelEndPoint;
@@ -825,7 +825,7 @@
                                                                 srcPoint,
                                                                 dstPoint,
                                                                 tunnelType,
-                                                                new DefaultGroupId(0),
+                                                                new GroupId(0),
                                                                 id(), name,
                                                                 path,
                                                                 annotations);
@@ -1630,7 +1630,7 @@
                 }
                 annotations = getAnnotations(lspObj, ipv4LspIdenTlv, tempBandwidth, lspType,
                     temoCostType, lspObj.getCFlag());
-                td = new DefaultTunnelDescription(null, tunnelEndPointSrc, tunnelEndPointDst, MPLS, new DefaultGroupId(
+                td = new DefaultTunnelDescription(null, tunnelEndPointSrc, tunnelEndPointDst, MPLS, new GroupId(
                         0), providerId, TunnelName.tunnelName(new String(pathNameTlv.getValue())), path, labelStack,
                         annotations);
                 // Do not support PCC initiated LSP after LSP DB sync is completed.
@@ -1661,7 +1661,7 @@
                 if (mastershipService.isLocalMaster(deviceId)) {
                     TunnelId tId = tunnelAdded(td, tunnelState);
                     Tunnel tunnelInserted = new DefaultTunnel(providerId, tunnelEndPointSrc, tunnelEndPointDst, MPLS,
-                            tunnelState, new DefaultGroupId(0), tId, TunnelName.tunnelName(String.valueOf(pathNameTlv
+                            tunnelState, new GroupId(0), tId, TunnelName.tunnelName(String.valueOf(pathNameTlv
                                     .getValue())), path, labelStack, annotations);
 
                     PcepTunnelData pcepTunnelData = new PcepTunnelData(tunnelInserted, path, LSP_STATE_RPT);
@@ -1693,7 +1693,7 @@
             annotations = getAnnotations(lspObj, ipv4LspIdenTlv,
                     tunnel.annotations().value(BANDWIDTH), lspType,
                     tunnel.annotations().value(COST_TYPE), isPceInit);
-            td = new DefaultTunnelDescription(null, tunnel.src(), tunnel.dst(), MPLS, new DefaultGroupId(
+            td = new DefaultTunnelDescription(null, tunnel.src(), tunnel.dst(), MPLS, new GroupId(
                     0), tunnel.providerId(), tunnel.tunnelName(),
                     tunnel.path(), labelStack, annotations);
             tunnelUpdateInDelegatedCase(pccId, annotations, td, tunnel.providerId(), tunnelState, ipv4LspIdenTlv);
@@ -1957,7 +1957,7 @@
             //If tunnel is found update the tunnel and shutdown the thread otherwise thread will be executing
             //periodically
             if (tempTunnelId != null) {
-                Tunnel tunnel = new DefaultTunnel(providerId, td.src(), td.dst(), MPLS, new DefaultGroupId(0),
+                Tunnel tunnel = new DefaultTunnel(providerId, td.src(), td.dst(), MPLS, new GroupId(0),
                         tempTunnelId, td.tunnelName(), td.path(), annotations);
                 PcepTunnelData pcepTunnelData = new PcepTunnelData(tunnel, tunnel.path(), LSP_STATE_RPT);
                 pcepTunnelData.setStatefulIpv4IndentifierTlv(ipv4LspIdentifiersTlv);
diff --git a/providers/pcep/tunnel/src/test/java/org/onosproject/provider/pcep/tunnel/impl/PcepReleaseTunnelProviderTest.java b/providers/pcep/tunnel/src/test/java/org/onosproject/provider/pcep/tunnel/impl/PcepReleaseTunnelProviderTest.java
index ef96601..b74fd1c 100644
--- a/providers/pcep/tunnel/src/test/java/org/onosproject/provider/pcep/tunnel/impl/PcepReleaseTunnelProviderTest.java
+++ b/providers/pcep/tunnel/src/test/java/org/onosproject/provider/pcep/tunnel/impl/PcepReleaseTunnelProviderTest.java
@@ -34,7 +34,7 @@
 import org.junit.Test;
 import org.onlab.packet.IpAddress;
 import org.onosproject.cfg.ComponentConfigAdapter;
-import org.onosproject.core.DefaultGroupId;
+import org.onosproject.core.GroupId;
 import org.onosproject.incubator.net.tunnel.DefaultTunnel;
 import org.onosproject.incubator.net.tunnel.IpTunnelEndPoint;
 import org.onosproject.incubator.net.tunnel.Tunnel;
@@ -122,7 +122,7 @@
                 .build();
 
         tunnel = new DefaultTunnel(pid, ipTunnelEndPointSrc, ipTunnelEndPointDst, Tunnel.Type.MPLS,
-                                   new DefaultGroupId(0), TunnelId.valueOf("1"), TunnelName.tunnelName("T123"),
+                                   new GroupId(0), TunnelId.valueOf("1"), TunnelName.tunnelName("T123"),
                                    path, annotations);
 
         // for releasing tunnel tunnel should exist in db
@@ -178,7 +178,7 @@
                 .build();
 
         tunnel = new DefaultTunnel(pid, ipTunnelEndPointSrc, ipTunnelEndPointDst, Tunnel.Type.MPLS,
-                                   new DefaultGroupId(0), TunnelId.valueOf("1"), TunnelName.tunnelName("T123"),
+                                   new GroupId(0), TunnelId.valueOf("1"), TunnelName.tunnelName("T123"),
                                    path, annotations);
 
         // for releasing tunnel tunnel should exist in db
@@ -234,7 +234,7 @@
                 .build();
 
         tunnel = new DefaultTunnel(pid, ipTunnelEndPointSrc, ipTunnelEndPointDst, Tunnel.Type.MPLS,
-                                   new DefaultGroupId(0), TunnelId.valueOf("1"), TunnelName.tunnelName("T123"),
+                                   new GroupId(0), TunnelId.valueOf("1"), TunnelName.tunnelName("T123"),
                                    path, annotations);
 
         // for releasing tunnel tunnel should exist in db
@@ -290,7 +290,7 @@
                 .build();
 
         tunnel = new DefaultTunnel(pid, ipTunnelEndPointSrc, ipTunnelEndPointDst, Tunnel.Type.MPLS,
-                                   new DefaultGroupId(0), TunnelId.valueOf("1"), TunnelName.tunnelName("T123"),
+                                   new GroupId(0), TunnelId.valueOf("1"), TunnelName.tunnelName("T123"),
                                    path, annotations);
 
         // for releasing tunnel tunnel should exist in db
diff --git a/providers/pcep/tunnel/src/test/java/org/onosproject/provider/pcep/tunnel/impl/PcepSetupTunnelProviderTest.java b/providers/pcep/tunnel/src/test/java/org/onosproject/provider/pcep/tunnel/impl/PcepSetupTunnelProviderTest.java
index b26a39f..e244297 100644
--- a/providers/pcep/tunnel/src/test/java/org/onosproject/provider/pcep/tunnel/impl/PcepSetupTunnelProviderTest.java
+++ b/providers/pcep/tunnel/src/test/java/org/onosproject/provider/pcep/tunnel/impl/PcepSetupTunnelProviderTest.java
@@ -34,7 +34,7 @@
 import org.junit.Test;
 import org.onlab.packet.IpAddress;
 import org.onosproject.cfg.ComponentConfigAdapter;
-import org.onosproject.core.DefaultGroupId;
+import org.onosproject.core.GroupId;
 import org.onosproject.incubator.net.tunnel.DefaultTunnel;
 import org.onosproject.incubator.net.tunnel.IpTunnelEndPoint;
 import org.onosproject.incubator.net.tunnel.Tunnel;
@@ -117,7 +117,7 @@
                 .build();
 
         tunnel = new DefaultTunnel(pid, ipTunnelEndPointSrc, ipTunnelEndPointDst, Tunnel.Type.MPLS,
-                                   new DefaultGroupId(0), TunnelId.valueOf("1"), TunnelName.tunnelName("T123"),
+                                   new GroupId(0), TunnelId.valueOf("1"), TunnelName.tunnelName("T123"),
                                    path, annotations);
         controller.getClient(PccId.pccId(IpAddress.valueOf(0xC010101))).setCapability(
                 new ClientCapability(true, true, true, true, true));
@@ -162,7 +162,7 @@
                 .build();
 
         tunnel = new DefaultTunnel(pid, ipTunnelEndPointSrc, ipTunnelEndPointDst, Tunnel.Type.MPLS,
-                                   new DefaultGroupId(0), TunnelId.valueOf("1"), TunnelName.tunnelName("T123"),
+                                   new GroupId(0), TunnelId.valueOf("1"), TunnelName.tunnelName("T123"),
                                    path, annotations);
         controller.getClient(PccId.pccId(IpAddress.valueOf(0xC010103))).setCapability(
                 new ClientCapability(true, true, true, true, true));
@@ -207,7 +207,7 @@
                 .build();
 
         tunnel = new DefaultTunnel(pid, ipTunnelEndPointSrc, ipTunnelEndPointDst, Tunnel.Type.MPLS,
-                                   new DefaultGroupId(0), TunnelId.valueOf("1"), TunnelName.tunnelName("T123"),
+                                   new GroupId(0), TunnelId.valueOf("1"), TunnelName.tunnelName("T123"),
                                    path, annotations);
         controller.getClient(PccId.pccId(IpAddress.valueOf(0xC010101))).setCapability(
                 new ClientCapability(true, true, true, true, true));
@@ -252,7 +252,7 @@
                 .build();
 
         tunnel = new DefaultTunnel(pid, ipTunnelEndPointSrc, ipTunnelEndPointDst, Tunnel.Type.MPLS,
-                                   new DefaultGroupId(0), TunnelId.valueOf("1"), TunnelName.tunnelName("T123"),
+                                   new GroupId(0), TunnelId.valueOf("1"), TunnelName.tunnelName("T123"),
                                    path, annotations);
         controller.getClient(PccId.pccId(IpAddress.valueOf(0xC010101))).setCapability(
                 new ClientCapability(true, true, true, true, true));
diff --git a/providers/pcep/tunnel/src/test/java/org/onosproject/provider/pcep/tunnel/impl/PcepTunnelProviderTest.java b/providers/pcep/tunnel/src/test/java/org/onosproject/provider/pcep/tunnel/impl/PcepTunnelProviderTest.java
index 7c606cb..24f131a 100644
--- a/providers/pcep/tunnel/src/test/java/org/onosproject/provider/pcep/tunnel/impl/PcepTunnelProviderTest.java
+++ b/providers/pcep/tunnel/src/test/java/org/onosproject/provider/pcep/tunnel/impl/PcepTunnelProviderTest.java
@@ -29,7 +29,7 @@
 import org.junit.After;
 import org.junit.Test;
 import org.onlab.packet.IpAddress;
-import org.onosproject.core.DefaultGroupId;
+import org.onosproject.core.GroupId;
 import org.onosproject.incubator.net.tunnel.DefaultTunnel;
 import org.onosproject.incubator.net.tunnel.IpTunnelEndPoint;
 import org.onosproject.incubator.net.tunnel.Tunnel;
@@ -105,7 +105,7 @@
                 .build();
 
         tunnel = new DefaultTunnel(pid, ipTunnelEndPointSrc, ipTunnelEndPointDst, Tunnel.Type.MPLS,
-                                   new DefaultGroupId(0), TunnelId.valueOf("1"), TunnelName.tunnelName("T123"),
+                                   new GroupId(0), TunnelId.valueOf("1"), TunnelName.tunnelName("T123"),
                                    path, annotations);
         controller.getClient(PccId.pccId(IpAddress.valueOf(0xC010101))).setCapability(
                 new ClientCapability(true, true, true, true, true));
diff --git a/providers/pcep/tunnel/src/test/java/org/onosproject/provider/pcep/tunnel/impl/PcepUpdateTunnelProviderTest.java b/providers/pcep/tunnel/src/test/java/org/onosproject/provider/pcep/tunnel/impl/PcepUpdateTunnelProviderTest.java
index 1e6a919..012f5a0 100644
--- a/providers/pcep/tunnel/src/test/java/org/onosproject/provider/pcep/tunnel/impl/PcepUpdateTunnelProviderTest.java
+++ b/providers/pcep/tunnel/src/test/java/org/onosproject/provider/pcep/tunnel/impl/PcepUpdateTunnelProviderTest.java
@@ -33,7 +33,7 @@
 import org.junit.Test;
 import org.onlab.packet.IpAddress;
 import org.onosproject.cfg.ComponentConfigAdapter;
-import org.onosproject.core.DefaultGroupId;
+import org.onosproject.core.GroupId;
 import org.onosproject.incubator.net.tunnel.DefaultTunnel;
 import org.onosproject.incubator.net.tunnel.IpTunnelEndPoint;
 import org.onosproject.incubator.net.tunnel.Tunnel;
@@ -120,7 +120,7 @@
                 .build();
 
         tunnel = new DefaultTunnel(pid, ipTunnelEndPointSrc, ipTunnelEndPointDst, Tunnel.Type.MPLS,
-                                   new DefaultGroupId(0), TunnelId.valueOf("1"), TunnelName.tunnelName("T123"),
+                                   new GroupId(0), TunnelId.valueOf("1"), TunnelName.tunnelName("T123"),
                                    path, annotations);
 
         // for updating tunnel tunnel should exist in db
@@ -180,7 +180,7 @@
                 .build();
 
         tunnel = new DefaultTunnel(pid, ipTunnelEndPointSrc, ipTunnelEndPointDst, Tunnel.Type.MPLS,
-                                   new DefaultGroupId(0), TunnelId.valueOf("1"), TunnelName.tunnelName("T123"),
+                                   new GroupId(0), TunnelId.valueOf("1"), TunnelName.tunnelName("T123"),
                                    path, annotations);
 
         // for updating tunnel tunnel should exist in db
@@ -240,7 +240,7 @@
                 .build();
 
         tunnel = new DefaultTunnel(pid, ipTunnelEndPointSrc, ipTunnelEndPointDst, Tunnel.Type.MPLS,
-                                   new DefaultGroupId(0), TunnelId.valueOf("1"), TunnelName.tunnelName("T123"),
+                                   new GroupId(0), TunnelId.valueOf("1"), TunnelName.tunnelName("T123"),
                                    path, annotations);
 
         // for updating tunnel tunnel should exist in db
@@ -300,7 +300,7 @@
                 .build();
 
         tunnel = new DefaultTunnel(pid, ipTunnelEndPointSrc, ipTunnelEndPointDst, Tunnel.Type.MPLS,
-                                   new DefaultGroupId(0), TunnelId.valueOf("1"), TunnelName.tunnelName("T123"),
+                                   new GroupId(0), TunnelId.valueOf("1"), TunnelName.tunnelName("T123"),
                                    path, annotations);
 
         // for updating tunnel tunnel should exist in db
diff --git a/web/api/src/test/java/org/onosproject/rest/resources/FlowsResourceTest.java b/web/api/src/test/java/org/onosproject/rest/resources/FlowsResourceTest.java
index 9c7318c..6b9a8ee 100644
--- a/web/api/src/test/java/org/onosproject/rest/resources/FlowsResourceTest.java
+++ b/web/api/src/test/java/org/onosproject/rest/resources/FlowsResourceTest.java
@@ -43,7 +43,6 @@
 import org.onosproject.codec.impl.CodecManager;
 import org.onosproject.codec.impl.FlowRuleCodec;
 import org.onosproject.core.CoreService;
-import org.onosproject.core.DefaultGroupId;
 import org.onosproject.core.GroupId;
 import org.onosproject.net.DefaultDevice;
 import org.onosproject.net.Device;
@@ -184,7 +183,7 @@
 
         @Override
         public GroupId groupId() {
-            return new DefaultGroupId(3);
+            return new GroupId(3);
         }
 
         @Override
diff --git a/web/api/src/test/java/org/onosproject/rest/resources/GroupsResourceTest.java b/web/api/src/test/java/org/onosproject/rest/resources/GroupsResourceTest.java
index 0e494ef..731af65 100644
--- a/web/api/src/test/java/org/onosproject/rest/resources/GroupsResourceTest.java
+++ b/web/api/src/test/java/org/onosproject/rest/resources/GroupsResourceTest.java
@@ -35,7 +35,6 @@
 import org.onosproject.core.ApplicationId;
 import org.onosproject.core.CoreService;
 import org.onosproject.core.DefaultApplicationId;
-import org.onosproject.core.DefaultGroupId;
 import org.onosproject.core.GroupId;
 import org.onosproject.net.DefaultDevice;
 import org.onosproject.net.Device;
@@ -127,7 +126,7 @@
 
         @Override
         public GroupId id() {
-            return new DefaultGroupId((int) baseValue + 55);
+            return new GroupId((int) baseValue + 55);
         }
 
         @Override
diff --git a/web/api/src/test/java/org/onosproject/rest/resources/IntentsResourceTest.java b/web/api/src/test/java/org/onosproject/rest/resources/IntentsResourceTest.java
index da603cd..623db9c 100644
--- a/web/api/src/test/java/org/onosproject/rest/resources/IntentsResourceTest.java
+++ b/web/api/src/test/java/org/onosproject/rest/resources/IntentsResourceTest.java
@@ -34,7 +34,6 @@
 import org.onosproject.core.ApplicationId;
 import org.onosproject.core.CoreService;
 import org.onosproject.core.DefaultApplicationId;
-import org.onosproject.core.DefaultGroupId;
 import org.onosproject.core.GroupId;
 import org.onosproject.core.IdGenerator;
 import org.onosproject.net.DeviceId;
@@ -211,7 +210,7 @@
 
         @Override
         public GroupId groupId() {
-            return new DefaultGroupId(3);
+            return new GroupId(3);
         }
 
         @Override
@@ -317,7 +316,7 @@
 
         @Override
         public GroupId groupId() {
-            return new DefaultGroupId(3);
+            return new GroupId(3);
         }
 
         @Override