improve test code
add testPathWhenUndexIsMiddleOfPath