public static QuickTextPagerView createQuickTextView(
      Context context,
      ViewGroup parent,
      QuickKeyHistoryRecords quickKeyHistoryRecords,
      DefaultSkinTonePrefTracker defaultSkinTonePrefTracker,
      DefaultGenderPrefTracker defaultGenderPrefTracker) {
    LayoutInflater inflater = LayoutInflater.from(context);
    QuickTextPagerView rootView =
        (QuickTextPagerView) inflater.inflate(R.layout.quick_text_popup_root_view, parent, false);
    // hard setting the height - this should be the same height as the standard keyboard
    ViewGroup.LayoutParams params = rootView.getLayoutParams();
    params.height = parent.getHeight();

    rootView.setLayoutParams(params);
    rootView.setQuickKeyHistoryRecords(quickKeyHistoryRecords);
    rootView.setEmojiVariantsPrefTrackers(defaultSkinTonePrefTracker, defaultGenderPrefTracker);

    return rootView;
  }
@Test
  public void testCreateQuickTextView() throws Exception {
    LinearLayout linearLayout = new LinearLayout(getApplicationContext());
    QuickTextPagerView view =
        QuickTextViewFactory.createQuickTextView(
            getApplicationContext(),
            linearLayout,
            new QuickKeyHistoryRecords(prefs(getApplicationContext())),
            mock(DefaultSkinTonePrefTracker.class),
            mock(DefaultGenderPrefTracker.class));

    Assert.assertNotNull(view);

    Assert.assertEquals(ViewGroup.LayoutParams.MATCH_PARENT, view.getLayoutParams().width);
  }