Added test code and some of volatile metadata tests