I\'m testing a method that calls a function from my repository and returns it as a list but I keep getting this error System.InvalidCastException: Unable to cast object of t