private void AssertCorrectLength(ConstraintRule constraintRule)
        {
            // GIVEN
            ByteBuffer buffer = ByteBuffer.wrap(SchemaRuleSerialization.Serialize(constraintRule));

            // THEN
            assertThat(SchemaRuleSerialization.LengthOf(constraintRule), equalTo(buffer.capacity()));
        }
        private void AssertCorrectLength(StoreIndexDescriptor indexRule)
        {
            // GIVEN
            ByteBuffer buffer = ByteBuffer.wrap(SchemaRuleSerialization.Serialize(indexRule));

            // THEN
            assertThat(SchemaRuleSerialization.LengthOf(indexRule), equalTo(buffer.capacity()));
        }
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
//ORIGINAL LINE: private org.neo4j.storageengine.api.schema.SchemaRule serialiseAndDeserialise(org.neo4j.storageengine.api.schema.StoreIndexDescriptor indexRule) throws org.neo4j.internal.kernel.api.exceptions.schema.MalformedSchemaRuleException
        private SchemaRule SerialiseAndDeserialise(StoreIndexDescriptor indexRule)
        {
            ByteBuffer buffer = ByteBuffer.wrap(SchemaRuleSerialization.Serialize(indexRule));

            return(SchemaRuleSerialization.Deserialize(indexRule.Id, buffer));
        }
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
//ORIGINAL LINE: private org.neo4j.storageengine.api.schema.SchemaRule serialiseAndDeserialise(ConstraintRule constraintRule) throws org.neo4j.internal.kernel.api.exceptions.schema.MalformedSchemaRuleException
        private SchemaRule SerialiseAndDeserialise(ConstraintRule constraintRule)
        {
            ByteBuffer buffer = ByteBuffer.wrap(SchemaRuleSerialization.Serialize(constraintRule));

            return(SchemaRuleSerialization.Deserialize(constraintRule.Id, buffer));
        }