@Test
public void testViewChild() throws Exception {

    ArgumentCaptor<Intent> captor = ArgumentCaptor.forClass(Intent.class);
    doNothing().when(activity).startActivity(captor.capture());
    activity.child = new Child("id1", "user1", null);
    activity.view();
    Intent intent = captor.getValue();
    assertThat(intent.getComponent(), equalTo(new ComponentName(activity.getContext(), ViewChildActivity.class)));
    assertThat(intent.getStringExtra("id"), equalTo("id1"));
}