MenuItemAdapter extends BaseAdapter { @Override public int getCount() { return MenuItem.values().length; } @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 testThatGetCountIsExactlyTheNumberOfMenuItems() { assertThat(menuItemAdapter.getCount()).isEqualTo(MenuItem.values().length); }