Fix iterator moving backwards and created unit test for the JniDBIterator