### Question:
ContentAdapter extends BaseAdapter { @Override public View getView(int position, View convertView, ViewGroup parent) { Holder holder; View view = convertView; if (view == null) { view = layoutInflater.inflate(R.layout.item_content, parent, false); holder = new Holder(); holder.title = (TextView) view.findViewById(R.id.title); holder.value = (TextView) view.findViewById(R.id.value); view.setTag(holder); } else { holder = (Holder) view.getTag(); } ContentHolder item = getItem(position); holder.title.setText(item.getTitle()); holder.value.setText(item.getValue()); return view; } ContentAdapter(Context context, List<ContentHolder> list); @Override int getCount(); @Override ContentHolder getItem(int position); @Override long getItemId(int position); @Override View getView(int position, View convertView, ViewGroup parent);  }### Answer:
@Test public void getViewShouldNotReturnNull() throws Exception { ContentAdapter contentAdapter = new ContentAdapter(context, list); View view = contentAdapter.getView(0, null, new LinearLayout(context)); assertThat(view).isNotNull(); }
@Test public void getViewShouldHaveContentHolderInTag() throws Exception { ContentAdapter contentAdapter = new ContentAdapter(context, list); View view = contentAdapter.getView(0, null, new LinearLayout(context)); ContentAdapter.Holder holder = (ContentAdapter.Holder) view.getTag(); assertThat(holder).isNotNull(); assertThat(holder.title.getText()).isEqualTo("title1"); assertThat(holder.value.getText()).isEqualTo("value1"); }