TranslationTabsFragment extends Fragment { public NewTranslation getCurrentTranslation() { return currentTranslation; }  void setOnLanguageTabSelectedListener(OnLanguageTabSelectedListener onLanguageTabSelectedListener); @Override View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState); void setCurrentTranslation(NewTranslation currentTranslation); NewTranslation getCurrentTranslation();  }
@Test public void shouldReturnCurrentTranslationForTab() { NewTranslation newTranslation = translationTabsFragment.getCurrentTranslation(); assertEquals("arabic", newTranslation.getDictionary().getLanguage()); }
@Test public void shouldReturnTranslationContextForSecondTabAfterSecondTabHasBeenClicked() { getLanguageTabAtPosition(1).performClick(); NewTranslation newTranslation = translationTabsFragment.getCurrentTranslation(); assertEquals("pashto", newTranslation.getDictionary().getLanguage()); }