Created test for getMaximumDistance