ServerFoundActivity extends BaseActivity implements ServerFoundView { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_server_found); initUi(); presenter.attachView(this); mapExtras(); }  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 shouldProperlyAttachViewToPresenterWhenCreatingActivity() throws Exception { ServerFoundActivity serverFoundActivityNotCreated = Robolectric.buildActivity(ServerFoundActivity.class).get(); serverFoundActivityNotCreated.onCreate(null); verify(mockServerFoundPresenter, times(1)).attachView(serverFoundActivityNotCreated); }