small refactoring and new tests for hte ColumnMetadata class