public final synchronized List<E> getAllAddOns() {
    Logger.d(mTag, "getAllAddOns has %d add on for %s", mAddOns.size(), getClass().getName());
    if (mAddOns.size() == 0) {
      loadAddOns();
    }
    Logger.d(
        mTag, "getAllAddOns will return %d add on for %s", mAddOns.size(), getClass().getName());
    return unmodifiableList(mAddOns);
  }
@Test(expected = IllegalStateException.class)
  public void testMustSupplyNoneEmptyBuiltIns() throws Exception {
    AddOnsFactory.SingleAddOnsFactory<TestAddOn> singleAddOnsFactory =
        new AddOnsFactory.SingleAddOnsFactory<>(
            getApplicationContext(),
            SharedPrefsHelper.getSharedPreferences(),
            "ASK_KT",
            "com.anysoftkeyboard.plugin.TEST",
            "com.anysoftkeyboard.plugindata.TEST",
            "TestAddOns",
            "TestAddOn",
            "test",
            R.xml.test_add_ons_empty,
            R.string.test_default_test_addon_id,
            true,
            true) {

          @Override
          public void setAddOnEnabled(String addOnId, boolean enabled) {}

          @Override
          protected TestAddOn createConcreteAddOn(
              Context askContext,
              Context context,
              int apiVersion,
              CharSequence prefId,
              CharSequence name,
              CharSequence description,
              boolean isHidden,
              int sortIndex,
              AttributeSet attrs) {
            return null;
          }
        };

    Assert.assertNotNull(singleAddOnsFactory.getAllAddOns());
  }