MenuItemAdapter extends BaseAdapter { @Override public long getItemId(int position) { return position; } @VisibleForTesting protected  MenuItemAdapter(Context context); static MenuItemAdapter newInstance(); @Override int getCount(); @Override MenuItem getItem(int position); @Override long getItemId(int position); @Override View getView(int position, View convertView, ViewGroup parent);  }
@Test public void testThatGetItemIdReturnsItemPosition() { assertThat(menuItemAdapter.getItemId(position)).isEqualTo(position); }