Add more spec examples.

Add spec example for metadata declaration.
Fix spec examples to consistently have trailing newline.