added spec tests for metadata and it's api controller