Switch MetadataShardDataTreeSnapshot to new Proxy
[controller.git] / opendaylight / md-sal / sal-distributed-datastore / src / test / java / org / opendaylight / controller / cluster / datastore / persisted / ShardDataTreeSnapshotTest.java
index 9c50f1669c4d355a371f5c8b1128c5a31f8fc033..b0bb23046415a4c0e4e5ba5504dffdae9ce3ab15 100644 (file)
@@ -46,7 +46,7 @@ public class ShardDataTreeSnapshotTest {
         }
 
         final byte[] bytes = bos.toByteArray();
-        assertEquals(236, bytes.length);
+        assertEquals(202, bytes.length);
 
         ShardDataTreeSnapshot deserialized;
         try (ObjectInputStream in = new ObjectInputStream(new ByteArrayInputStream(bytes))) {
@@ -73,7 +73,7 @@ public class ShardDataTreeSnapshotTest {
         }
 
         final byte[] bytes = bos.toByteArray();
-        assertEquals(384, bytes.length);
+        assertEquals(350, bytes.length);
 
         ShardDataTreeSnapshot deserialized;
         try (ObjectInputStream in = new ObjectInputStream(new ByteArrayInputStream(bytes))) {
@@ -87,6 +87,7 @@ public class ShardDataTreeSnapshotTest {
 
     static class TestShardDataTreeSnapshotMetadata
             extends ShardDataTreeSnapshotMetadata<TestShardDataTreeSnapshotMetadata> {
+        @java.io.Serial
         private static final long serialVersionUID = 1L;
 
         private final String data;
@@ -112,8 +113,7 @@ public class ShardDataTreeSnapshotTest {
 
         @Override
         public boolean equals(final Object obj) {
-            return obj instanceof TestShardDataTreeSnapshotMetadata
-                    && data.equals(((TestShardDataTreeSnapshotMetadata)obj).data);
+            return obj instanceof TestShardDataTreeSnapshotMetadata other && data.equals(other.data);
         }
 
         private static class Proxy implements Externalizable {