LUCENE-5405: Add unit test.
LUCENE-5405: add negative test case.