Added many to many relationship and test cases

Added many to many relationship and test cases