Instrumentation inst = getInstrumentation();
int count = mListView.getAdapter().getCount();
for (int i = 0; i < count - 1; i++) {
inst.sendCharacterSync(KeyEvent.KEYCODE_DPAD_DOWN);
}
inst.waitForIdleSync();
int convertMissesBefore = mActivity.getConvertMisses();
assertEquals("Unexpected convert misses", 0, convertMissesBefore);
for (int i = 0; i < count - 1; i++) {
inst.sendCharacterSync(KeyEvent.KEYCODE_DPAD_UP);
}
inst.waitForIdleSync();
int convertMissesAfter = mActivity.getConvertMisses();
assertEquals("Unexpected convert misses", 0, convertMissesAfter);