Can you use the scala 2.10 string substitution for this? Also, I'm not sure if there's an advantage but we usually use sys.error for throwing generic exceptions. Also, stringOf has the doc string 'The object ScalaRunTime provides support methods required by the scala runtime. All these methods should be considered outside the API and subject to change or removal without notice.' So instead of doing that to get the values of an array to print, I usually just use .toSeq, who's .toString method prints the values. So:

```scala
sys.error(s"Arrays don't match for key = ${key.get} and i = $i, expected = ${expected.array.toSeq} and actual = ${actual.array.toSeq}")
```