Completed implementation and tests for ClassMetadata.