Update a test case to use both map and function for `relatedModel`