ServerFoundActivity extends BaseActivity implements ServerFoundView { @Override public void navigateBack(boolean isSuccess, ServerModel serverModel) { navigator.finishActivity(this, isSuccess, KEY_SERVER, serverModel); }  static Intent getCallingIntent(Context context, ServerModel serverModel); @Override boolean onOptionsItemSelected(MenuItem item); @Override void renderServer(@NonNull ServerModel serverModel); @Override void showError(@NonNull String errorMessage); @Override void navigateBack(boolean isSuccess, ServerModel serverModel); @OnClick(R.id.button_connect) void onConnectButtonClick(View view); static final String KEY_SERVER; }
@Test public void shouldNavigateBack() throws Exception { ServerModel serverModel = getServerModel(); serverFoundActivity.navigateBack(true, serverModel); verify(mockNavigator).finishActivity(serverFoundActivity, true, "server", serverModel); }