MenuItemAdapter extends BaseAdapter { @Override public MenuItem getItem(int position) { return MenuItem.values()[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 testThatGetItemReturnsFromMenuItem() { assertThat(menuItemAdapter.getItem(position).value()).isEqualTo(item); }