Changing apply schema to set schema
Adding test cases for new schema functionality