LoginActivity extends AccountAuthenticatorActionBarActivity implements
        LoginUrlFragment.OnFragmentInteractionListener,
        LoginFragment.OnFragmentInteractionListener { @Override public void onValidUrl(String blogUrl) { this.blogUrl = blogUrl; getSupportFragmentManager().beginTransaction() .setCustomAnimations(R.anim.slide_in_right, R.anim.slide_out_left, R.anim.slide_in_left, R.anim.slide_out_right) .replace(R.id.container, LoginFragment.newInstance(blogUrl)) .addToBackStack(null) .commit(); }  @Override boolean onOptionsItemSelected(MenuItem item); @Override void onBackPressed(); @Override void onValidUrl(String blogUrl); @Override void onSuccess(String email, String password, Token token, User user);  }
@Test public void shouldReplaceFragmentOnValidUrl() { loginActivity.onValidUrl("http: assertThat(loginActivity.getSupportFragmentManager().findFragmentById(R.id.container), instanceOf(LoginFragment.class)); }