Added tests for models with relationships