Added unit testing for metadata controller and models