ServerFoundActivity extends BaseActivity implements ServerFoundView { @Override public void renderServer(@NonNull ServerModel serverModel) { Bitmap worldImage = imageDecoder.decode(serverModel.encodedWorldImage()); int osIconResource = osIconProvider.getIconForOs(serverModel.os()); serverInfoView.renderServer(this, serverModel, imageLoader, worldImage, playerAvatarUrl, playerAvatarSize, osIconResource); }  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 shouldRenderServer() throws Exception { ServerModel serverModel = getServerModel(); serverFoundActivity.renderServer(serverModel); assertThat(serverFoundActivity.getSupportActionBar().getTitle(), notNullValue()); assertThat(serverFoundActivity.getSupportActionBar().getTitle(), is("Server found")); }