Test repository with query JOIN multiple tables