Tests for maxPos and minPos added