Fix for ONOS-5175. GroupId refactoring.

Science DefaultGroupId was deprecated, remove it from ONOS

Change-Id: I82394e58ec1ba10c37492ed77546e233de9f934f
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