@Test
public void shouldFinishActivityWhenHomePressed() {

    MenuItem item = new RoboMenuItem(android.R.id.home);
    loginActivity.onOptionsItemSelected(item);
    assertThat(loginActivity.isFinishing(), is(true));
}