Added the test case of needle in the middle.