public static void tripSuggestions(
      List<CharSequence> suggestions, final int maxSuggestions, List<CharSequence> stringsPool) {
    while (suggestions.size() > maxSuggestions) {
      removeSuggestion(suggestions, maxSuggestions, stringsPool);
    }
  }
@Test
  public void testTrimSuggestionsNoRecycleBackToPool() {
    ArrayList<CharSequence> list =
        new ArrayList<>(
            Arrays.<CharSequence>asList("typed", "something", "duped", "car", "something"));
    Assert.assertEquals(0, mStringPool.size());

    IMEUtil.tripSuggestions(list, 2, mStringPool);
    Assert.assertEquals(2, list.size());

    Assert.assertEquals("typed", list.get(0));
    Assert.assertEquals("something", list.get(1));

    Assert.assertEquals(0, mStringPool.size());
  }