public List<HistoryKey> getCurrentHistory() {
    if (mLoadedKeys.size() == 0)
      // For a unknown reason, we cannot have 0 history emoji...
      mLoadedKeys.add(new HistoryKey(DEFAULT_EMOJI, DEFAULT_EMOJI));
    return Collections.unmodifiableList(mLoadedKeys);
  }
@Test
  public void testLoadMoreThanLimit() {
    StringBuilder exceedString = new StringBuilder();
    for (int i = 0; i < QuickKeyHistoryRecords.MAX_LIST_SIZE * 2; i++) {
      exceedString
          .append(Integer.toString(2 * i))
          .append(QuickKeyHistoryRecords.HISTORY_TOKEN_SEPARATOR)
          .append(Integer.toString(2 * i + 1))
          .append(QuickKeyHistoryRecords.HISTORY_TOKEN_SEPARATOR);
    }
    mSharedPreferences
        .getString(R.string.settings_key_quick_text_history, R.string.settings_default_empty)
        .set(exceedString.toString());
    mUnderTest = new QuickKeyHistoryRecords(mSharedPreferences);
    List<QuickKeyHistoryRecords.HistoryKey> keys = mUnderTest.getCurrentHistory();
    Assert.assertEquals(QuickKeyHistoryRecords.MAX_LIST_SIZE, keys.size());
    Assert.assertEquals("0", keys.get(0).name);
    Assert.assertEquals("1", keys.get(0).value);
    Assert.assertEquals(
        Integer.toString(QuickKeyHistoryRecords.MAX_LIST_SIZE * 2 - 2),
        keys.get(QuickKeyHistoryRecords.MAX_LIST_SIZE - 1).name);
    Assert.assertEquals(
        Integer.toString(QuickKeyHistoryRecords.MAX_LIST_SIZE * 2 - 1),
        keys.get(QuickKeyHistoryRecords.MAX_LIST_SIZE - 1).value);
  }