You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by ib...@apache.org on 2024/02/02 07:22:47 UTC

(ignite-3) branch main updated: IGNITE-21423 Improve toString() implementations for classes representing Catalog objects (#3142)

This is an automated email from the ASF dual-hosted git repository.

ibessonov pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/ignite-3.git


The following commit(s) were added to refs/heads/main by this push:
     new 7209a59f5a IGNITE-21423 Improve toString() implementations for classes representing Catalog objects (#3142)
7209a59f5a is described below

commit 7209a59f5ae86f0c13f6013e666f3186c923170a
Author: Roman Puchkovskiy <ro...@gmail.com>
AuthorDate: Fri Feb 2 11:22:39 2024 +0400

    IGNITE-21423 Improve toString() implementations for classes representing Catalog objects (#3142)
---
 .../descriptors/CatalogHashIndexDescriptor.java    |  2 +-
 .../descriptors/CatalogIndexDescriptor.java        |  2 +-
 .../descriptors/CatalogObjectDescriptor.java       |  2 +-
 .../descriptors/CatalogSchemaDescriptor.java       |  2 +-
 .../descriptors/CatalogSortedIndexDescriptor.java  |  2 +-
 .../descriptors/CatalogSystemViewDescriptor.java   |  8 +++-
 .../descriptors/CatalogTableDescriptor.java        |  3 +-
 .../catalog/descriptors/CatalogZoneDescriptor.java |  2 +-
 .../CatalogDataStorageDescriptorTest.java          | 37 +++++++++++++++
 .../CatalogHashIndexDescriptorTest.java            | 40 ++++++++++++++++
 .../descriptors/CatalogSchemaDescriptorTest.java   | 44 ++++++++++++++++++
 .../CatalogSortedIndexDescriptorTest.java          | 40 ++++++++++++++++
 .../CatalogSystemViewDescriptorTest.java           | 45 ++++++++++++++++++
 .../descriptors/CatalogTableDescriptorTest.java    | 53 +++++++++++++++++++++
 .../descriptors/CatalogZoneDescriptorTest.java     | 54 ++++++++++++++++++++++
 15 files changed, 328 insertions(+), 8 deletions(-)

diff --git a/modules/catalog/src/main/java/org/apache/ignite/internal/catalog/descriptors/CatalogHashIndexDescriptor.java b/modules/catalog/src/main/java/org/apache/ignite/internal/catalog/descriptors/CatalogHashIndexDescriptor.java
index 8e7b0c6b45..dc189e4c0b 100644
--- a/modules/catalog/src/main/java/org/apache/ignite/internal/catalog/descriptors/CatalogHashIndexDescriptor.java
+++ b/modules/catalog/src/main/java/org/apache/ignite/internal/catalog/descriptors/CatalogHashIndexDescriptor.java
@@ -77,6 +77,6 @@ public class CatalogHashIndexDescriptor extends CatalogIndexDescriptor {
 
     @Override
     public String toString() {
-        return S.toString(this);
+        return S.toString(CatalogHashIndexDescriptor.class, this, super.toString());
     }
 }
diff --git a/modules/catalog/src/main/java/org/apache/ignite/internal/catalog/descriptors/CatalogIndexDescriptor.java b/modules/catalog/src/main/java/org/apache/ignite/internal/catalog/descriptors/CatalogIndexDescriptor.java
index 4434ef0af5..eff8ad4dd7 100644
--- a/modules/catalog/src/main/java/org/apache/ignite/internal/catalog/descriptors/CatalogIndexDescriptor.java
+++ b/modules/catalog/src/main/java/org/apache/ignite/internal/catalog/descriptors/CatalogIndexDescriptor.java
@@ -68,6 +68,6 @@ public abstract class CatalogIndexDescriptor extends CatalogObjectDescriptor {
 
     @Override
     public String toString() {
-        return S.toString(this);
+        return S.toString(CatalogIndexDescriptor.class, this, super.toString());
     }
 }
diff --git a/modules/catalog/src/main/java/org/apache/ignite/internal/catalog/descriptors/CatalogObjectDescriptor.java b/modules/catalog/src/main/java/org/apache/ignite/internal/catalog/descriptors/CatalogObjectDescriptor.java
index ead38f600e..26acb1d5cb 100644
--- a/modules/catalog/src/main/java/org/apache/ignite/internal/catalog/descriptors/CatalogObjectDescriptor.java
+++ b/modules/catalog/src/main/java/org/apache/ignite/internal/catalog/descriptors/CatalogObjectDescriptor.java
@@ -85,7 +85,7 @@ public abstract class CatalogObjectDescriptor implements Serializable {
 
     @Override
     public String toString() {
-        return S.toString(this);
+        return S.toString(CatalogObjectDescriptor.class, this);
     }
 
     /** Catalog object type. */
diff --git a/modules/catalog/src/main/java/org/apache/ignite/internal/catalog/descriptors/CatalogSchemaDescriptor.java b/modules/catalog/src/main/java/org/apache/ignite/internal/catalog/descriptors/CatalogSchemaDescriptor.java
index 3134dfa5ae..884d059141 100644
--- a/modules/catalog/src/main/java/org/apache/ignite/internal/catalog/descriptors/CatalogSchemaDescriptor.java
+++ b/modules/catalog/src/main/java/org/apache/ignite/internal/catalog/descriptors/CatalogSchemaDescriptor.java
@@ -103,6 +103,6 @@ public class CatalogSchemaDescriptor extends CatalogObjectDescriptor {
 
     @Override
     public String toString() {
-        return S.toString(this);
+        return S.toString(CatalogSchemaDescriptor.class, this, super.toString());
     }
 }
diff --git a/modules/catalog/src/main/java/org/apache/ignite/internal/catalog/descriptors/CatalogSortedIndexDescriptor.java b/modules/catalog/src/main/java/org/apache/ignite/internal/catalog/descriptors/CatalogSortedIndexDescriptor.java
index f0c1e07b0a..4c90006a78 100644
--- a/modules/catalog/src/main/java/org/apache/ignite/internal/catalog/descriptors/CatalogSortedIndexDescriptor.java
+++ b/modules/catalog/src/main/java/org/apache/ignite/internal/catalog/descriptors/CatalogSortedIndexDescriptor.java
@@ -85,7 +85,7 @@ public class CatalogSortedIndexDescriptor extends CatalogIndexDescriptor {
 
     @Override
     public String toString() {
-        return S.toString(this);
+        return S.toString(CatalogSortedIndexDescriptor.class, this, super.toString());
     }
 }
 
diff --git a/modules/catalog/src/main/java/org/apache/ignite/internal/catalog/descriptors/CatalogSystemViewDescriptor.java b/modules/catalog/src/main/java/org/apache/ignite/internal/catalog/descriptors/CatalogSystemViewDescriptor.java
index 37c5379a3f..7a50eb8576 100644
--- a/modules/catalog/src/main/java/org/apache/ignite/internal/catalog/descriptors/CatalogSystemViewDescriptor.java
+++ b/modules/catalog/src/main/java/org/apache/ignite/internal/catalog/descriptors/CatalogSystemViewDescriptor.java
@@ -88,7 +88,13 @@ public class CatalogSystemViewDescriptor extends CatalogObjectDescriptor {
     /** {@inheritDoc} */
     @Override
     public String toString() {
-        return S.toString(CatalogSystemViewDescriptor.class, this, "id", id(), "columns", columns, "systemViewType", systemViewType());
+        return S.toString(
+                CatalogSystemViewDescriptor.class, this,
+                "id", id(),
+                "name", name(),
+                "columns", columns,
+                "systemViewType", systemViewType()
+        );
     }
 
     /**
diff --git a/modules/catalog/src/main/java/org/apache/ignite/internal/catalog/descriptors/CatalogTableDescriptor.java b/modules/catalog/src/main/java/org/apache/ignite/internal/catalog/descriptors/CatalogTableDescriptor.java
index b9157c2650..bfceaa9931 100644
--- a/modules/catalog/src/main/java/org/apache/ignite/internal/catalog/descriptors/CatalogTableDescriptor.java
+++ b/modules/catalog/src/main/java/org/apache/ignite/internal/catalog/descriptors/CatalogTableDescriptor.java
@@ -46,6 +46,7 @@ public class CatalogTableDescriptor extends CatalogObjectDescriptor {
 
     private final int pkIndexId;
 
+    @IgniteToStringExclude
     private final CatalogTableSchemaVersions schemaVersions;
 
     private final List<CatalogTableColumnDescriptor> columns;
@@ -206,7 +207,7 @@ public class CatalogTableDescriptor extends CatalogObjectDescriptor {
 
     @Override
     public String toString() {
-        return S.toString(this);
+        return S.toString(CatalogTableDescriptor.class, this, super.toString());
     }
 
     public long creationToken() {
diff --git a/modules/catalog/src/main/java/org/apache/ignite/internal/catalog/descriptors/CatalogZoneDescriptor.java b/modules/catalog/src/main/java/org/apache/ignite/internal/catalog/descriptors/CatalogZoneDescriptor.java
index 3cddc79156..853bf9e3dc 100644
--- a/modules/catalog/src/main/java/org/apache/ignite/internal/catalog/descriptors/CatalogZoneDescriptor.java
+++ b/modules/catalog/src/main/java/org/apache/ignite/internal/catalog/descriptors/CatalogZoneDescriptor.java
@@ -141,6 +141,6 @@ public class CatalogZoneDescriptor extends CatalogObjectDescriptor {
 
     @Override
     public String toString() {
-        return S.toString(this);
+        return S.toString(CatalogZoneDescriptor.class, this, super.toString());
     }
 }
diff --git a/modules/catalog/src/test/java/org/apache/ignite/internal/catalog/descriptors/CatalogDataStorageDescriptorTest.java b/modules/catalog/src/test/java/org/apache/ignite/internal/catalog/descriptors/CatalogDataStorageDescriptorTest.java
new file mode 100644
index 0000000000..42a4735cc7
--- /dev/null
+++ b/modules/catalog/src/test/java/org/apache/ignite/internal/catalog/descriptors/CatalogDataStorageDescriptorTest.java
@@ -0,0 +1,37 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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.apache.ignite.internal.catalog.descriptors;
+
+import static org.hamcrest.MatcherAssert.assertThat;
+import static org.hamcrest.Matchers.containsString;
+import static org.hamcrest.Matchers.startsWith;
+
+import org.junit.jupiter.api.Test;
+
+class CatalogDataStorageDescriptorTest {
+    @Test
+    void toStringContainsTypeAndFields() {
+        var descriptor = new CatalogDataStorageDescriptor("the-engine", "the-region");
+
+        String toString = descriptor.toString();
+
+        assertThat(toString, startsWith("CatalogDataStorageDescriptor ["));
+        assertThat(toString, containsString("engine=the-engine"));
+        assertThat(toString, containsString("dataRegion=the-region"));
+    }
+}
diff --git a/modules/catalog/src/test/java/org/apache/ignite/internal/catalog/descriptors/CatalogHashIndexDescriptorTest.java b/modules/catalog/src/test/java/org/apache/ignite/internal/catalog/descriptors/CatalogHashIndexDescriptorTest.java
new file mode 100644
index 0000000000..d6153169ec
--- /dev/null
+++ b/modules/catalog/src/test/java/org/apache/ignite/internal/catalog/descriptors/CatalogHashIndexDescriptorTest.java
@@ -0,0 +1,40 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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.apache.ignite.internal.catalog.descriptors;
+
+import static org.hamcrest.MatcherAssert.assertThat;
+import static org.hamcrest.Matchers.containsString;
+import static org.hamcrest.Matchers.startsWith;
+
+import java.util.List;
+import org.junit.jupiter.api.Test;
+
+class CatalogHashIndexDescriptorTest {
+    @Test
+    void toStringContainsTypeAndFields() {
+        var descriptor = new CatalogHashIndexDescriptor(1, "index1", 2, false, 3, List.of("col"));
+
+        String toString = descriptor.toString();
+
+        assertThat(toString, startsWith("CatalogHashIndexDescriptor ["));
+        assertThat(toString, containsString("id=1"));
+        assertThat(toString, containsString("name=index1"));
+        assertThat(toString, containsString("tableId=2"));
+        assertThat(toString, containsString("status=REGISTERED"));
+    }
+}
diff --git a/modules/catalog/src/test/java/org/apache/ignite/internal/catalog/descriptors/CatalogSchemaDescriptorTest.java b/modules/catalog/src/test/java/org/apache/ignite/internal/catalog/descriptors/CatalogSchemaDescriptorTest.java
new file mode 100644
index 0000000000..4591d2d82e
--- /dev/null
+++ b/modules/catalog/src/test/java/org/apache/ignite/internal/catalog/descriptors/CatalogSchemaDescriptorTest.java
@@ -0,0 +1,44 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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.apache.ignite.internal.catalog.descriptors;
+
+import static org.hamcrest.MatcherAssert.assertThat;
+import static org.hamcrest.Matchers.containsString;
+import static org.hamcrest.Matchers.startsWith;
+
+import org.junit.jupiter.api.Test;
+
+class CatalogSchemaDescriptorTest {
+    @Test
+    void toStringContainsTypeAndFields() {
+        var descriptor = new CatalogSchemaDescriptor(
+                1,
+                "schema1",
+                new CatalogTableDescriptor[0],
+                new CatalogIndexDescriptor[0],
+                new CatalogSystemViewDescriptor[0],
+                123
+        );
+
+        String toString = descriptor.toString();
+
+        assertThat(toString, startsWith("CatalogSchemaDescriptor ["));
+        assertThat(toString, containsString("id=1"));
+        assertThat(toString, containsString("name=schema1"));
+    }
+}
diff --git a/modules/catalog/src/test/java/org/apache/ignite/internal/catalog/descriptors/CatalogSortedIndexDescriptorTest.java b/modules/catalog/src/test/java/org/apache/ignite/internal/catalog/descriptors/CatalogSortedIndexDescriptorTest.java
new file mode 100644
index 0000000000..979ff659ed
--- /dev/null
+++ b/modules/catalog/src/test/java/org/apache/ignite/internal/catalog/descriptors/CatalogSortedIndexDescriptorTest.java
@@ -0,0 +1,40 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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.apache.ignite.internal.catalog.descriptors;
+
+import static org.hamcrest.MatcherAssert.assertThat;
+import static org.hamcrest.Matchers.containsString;
+import static org.hamcrest.Matchers.startsWith;
+
+import java.util.List;
+import org.junit.jupiter.api.Test;
+
+class CatalogSortedIndexDescriptorTest {
+    @Test
+    void toStringContainsTypeAndFields() {
+        var descriptor = new CatalogSortedIndexDescriptor(1, "index1", 2, false, 3, List.of());
+
+        String toString = descriptor.toString();
+
+        assertThat(toString, startsWith("CatalogSortedIndexDescriptor ["));
+        assertThat(toString, containsString("id=1"));
+        assertThat(toString, containsString("name=index1"));
+        assertThat(toString, containsString("tableId=2"));
+        assertThat(toString, containsString("status=REGISTERED"));
+    }
+}
diff --git a/modules/catalog/src/test/java/org/apache/ignite/internal/catalog/descriptors/CatalogSystemViewDescriptorTest.java b/modules/catalog/src/test/java/org/apache/ignite/internal/catalog/descriptors/CatalogSystemViewDescriptorTest.java
new file mode 100644
index 0000000000..41ed56c46d
--- /dev/null
+++ b/modules/catalog/src/test/java/org/apache/ignite/internal/catalog/descriptors/CatalogSystemViewDescriptorTest.java
@@ -0,0 +1,45 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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.apache.ignite.internal.catalog.descriptors;
+
+import static org.hamcrest.MatcherAssert.assertThat;
+import static org.hamcrest.Matchers.containsString;
+import static org.hamcrest.Matchers.startsWith;
+
+import java.util.List;
+import org.apache.ignite.internal.catalog.descriptors.CatalogSystemViewDescriptor.SystemViewType;
+import org.junit.jupiter.api.Test;
+
+class CatalogSystemViewDescriptorTest {
+    @Test
+    void toStringContainsTypeAndFields() {
+        var descriptor = new CatalogSystemViewDescriptor(
+                1,
+                "view1",
+                List.of(),
+                SystemViewType.NODE
+        );
+
+        String toString = descriptor.toString();
+
+        assertThat(toString, startsWith("CatalogSystemViewDescriptor ["));
+        assertThat(toString, containsString("id=1"));
+        assertThat(toString, containsString("name=view1"));
+        assertThat(toString, containsString("systemViewType=NODE"));
+    }
+}
diff --git a/modules/catalog/src/test/java/org/apache/ignite/internal/catalog/descriptors/CatalogTableDescriptorTest.java b/modules/catalog/src/test/java/org/apache/ignite/internal/catalog/descriptors/CatalogTableDescriptorTest.java
new file mode 100644
index 0000000000..8393637cb6
--- /dev/null
+++ b/modules/catalog/src/test/java/org/apache/ignite/internal/catalog/descriptors/CatalogTableDescriptorTest.java
@@ -0,0 +1,53 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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.apache.ignite.internal.catalog.descriptors;
+
+import static org.hamcrest.MatcherAssert.assertThat;
+import static org.hamcrest.Matchers.containsString;
+import static org.hamcrest.Matchers.not;
+import static org.hamcrest.Matchers.startsWith;
+
+import java.util.List;
+import org.apache.ignite.sql.ColumnType;
+import org.junit.jupiter.api.Test;
+
+class CatalogTableDescriptorTest {
+    @Test
+    void toStringContainsTypeAndFields() {
+        var descriptor = new CatalogTableDescriptor(
+                1,
+                2,
+                3,
+                "table1",
+                4,
+                List.of(new CatalogTableColumnDescriptor("pkCol", ColumnType.STRING, false, 0, 0, 10, null)),
+                List.of("pkCol"),
+                null
+        );
+
+        String toString = descriptor.toString();
+
+        assertThat(toString, startsWith("CatalogTableDescriptor ["));
+        assertThat(toString, containsString("id=1"));
+        assertThat(toString, containsString("schemaId=2"));
+        assertThat(toString, containsString("pkIndexId=3"));
+        assertThat(toString, containsString("name=table1"));
+        assertThat(toString, containsString("zoneId=4"));
+        assertThat(toString, not(containsString("schemaVersions=")));
+    }
+}
diff --git a/modules/catalog/src/test/java/org/apache/ignite/internal/catalog/descriptors/CatalogZoneDescriptorTest.java b/modules/catalog/src/test/java/org/apache/ignite/internal/catalog/descriptors/CatalogZoneDescriptorTest.java
new file mode 100644
index 0000000000..503db1d6a2
--- /dev/null
+++ b/modules/catalog/src/test/java/org/apache/ignite/internal/catalog/descriptors/CatalogZoneDescriptorTest.java
@@ -0,0 +1,54 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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.apache.ignite.internal.catalog.descriptors;
+
+import static org.hamcrest.MatcherAssert.assertThat;
+import static org.hamcrest.Matchers.containsString;
+import static org.hamcrest.Matchers.startsWith;
+
+import org.junit.jupiter.api.Test;
+
+class CatalogZoneDescriptorTest {
+    @Test
+    void toStringContainsTypeAndFields() {
+        var descriptor = new CatalogZoneDescriptor(
+                1,
+                "zone1",
+                2,
+                3,
+                4,
+                5,
+                6,
+                "the-filter",
+                new CatalogDataStorageDescriptor("the-engine", "the-region")
+        );
+
+        String toString = descriptor.toString();
+
+        assertThat(toString, startsWith("CatalogZoneDescriptor ["));
+        assertThat(toString, containsString("id=1"));
+        assertThat(toString, containsString("name=zone1"));
+        assertThat(toString, containsString("partitions=2"));
+        assertThat(toString, containsString("replicas=3"));
+        assertThat(toString, containsString("dataNodesAutoAdjust=4"));
+        assertThat(toString, containsString("dataNodesAutoAdjustScaleUp=5"));
+        assertThat(toString, containsString("dataNodesAutoAdjustScaleDown=6"));
+        assertThat(toString, containsString("filter=the-filter"));
+        assertThat(toString, containsString("dataStorage=CatalogDataStorageDescriptor ["));
+    }
+}