AutocompletePrediction { public CharSequence getPrimaryText(@Nullable CharacterStyle characterStyle) { return primaryText; } AutocompletePrediction(@Nullable String id, @Nullable String text); CharSequence getFullText(@Nullable CharacterStyle characterStyle); CharSequence getPrimaryText(@Nullable CharacterStyle characterStyle); CharSequence getSecondaryText(@Nullable CharacterStyle characterStyle); @Nullable String getPlaceId(); @Nullable List<Integer> getPlaceTypes();  }
@Test public void getPrimaryText_shouldReturnCorrectText() { CharSequence text = prediction.getPrimaryText(null); assertThat(text.toString()).isEqualTo(primaryText); }