public void setNewConfiguration(@NonNull Configuration newConfiguration) {
    if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR1) {
      mAskAppContext = mAskAppContext.createConfigurationContext(newConfiguration);
    }
    mPackageContext.clear();
  }
@Test
  public void testSetNewConfiguration() {
    var withLocal = new TestableAddOn("id1", "name111", 8);
    Assert.assertSame(getApplicationContext(), withLocal.getPackageContext());
    Assert.assertEquals(
        1, withLocal.getPackageContext().getResources().getConfiguration().orientation);

    var newConfig = getApplicationContext().getResources().getConfiguration();
    newConfig.orientation = 2;
    withLocal.setNewConfiguration(newConfig);
    Assert.assertNotSame(getApplicationContext(), withLocal.getPackageContext());
    Assert.assertEquals(
        getApplicationContext().getPackageName(), withLocal.getPackageContext().getPackageName());
    Assert.assertEquals(
        2, withLocal.getPackageContext().getResources().getConfiguration().orientation);
  }