ClickCountViewModel extends ViewModel { public void onClickHiBrianLee() { try { attachedActivity.openUrl(appContext.getString(R.string.twitter_url)); } catch (Exception e) { e.printStackTrace(); } } ClickCountViewModel(@NonNull ActivityComponent activityComponent,
                        @Nullable State savedInstanceState); @Override State getInstanceState(); @Bindable String getClickCountText(); void onClickButton(); void onClickHiBrianLee();  }
@Test public void testOnClickHiBrianLee() throws Exception { viewModel.onClickHiBrianLee(); verify(attachedActivity).openUrl(TWITTER_URL); }