@Test
public void shouldNotThrowExceptionIfAsyncTaskIsNull() {

    RapidFtrApplication instance = RapidFtrApplication.getApplicationInstance();
    instance.setSyncTask(null);
    RapidFtrActivity mainActivity = new ViewAllChildrenActivity();
    MenuItem cancelSynAll = mock(MenuItem.class);
    doReturn(R.id.cancel_synchronize_all).when(cancelSynAll).getItemId();
    mainActivity.onOptionsItemSelected(cancelSynAll);
}