@@ -0,0 +1,1419 @@
+/*%0A * #%25L%0A * wcm.io%0A * %25%25%0A * Copyright (C) 2020 wcm.io%0A * %25%25%0A * Licensed under the Apache License, Version 2.0 (the %22License%22);%0A * you may not use this file except in compliance with the License.%0A * You may obtain a copy of the License at%0A *%0A *      http://www.apache.org/licenses/LICENSE-2.0%0A *%0A * Unless required by applicable law or agreed to in writing, software%0A * distributed under the License is distributed on an %22AS IS%22 BASIS,%0A * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.%0A * See the License for the specific language governing permissions and%0A * limitations under the License.%0A * #L%25%0A */%0Apackage io.wcm.testing.mock.aem.context;%0A%0Aimport static org.junit.Assert.assertEquals;%0A%0Aimport java.util.ResourceBundle;%0A%0Aimport org.apache.sling.testing.mock.sling.MockResourceBundle;%0Aimport org.junit.Rule;%0Aimport org.junit.Test;%0A%0Aimport com.day.cq.i18n.I18n;%0A%0Aimport io.wcm.testing.mock.aem.junit.AemContext;%0A%0A/**%0A * Test AEM I18n object with resource bundle support from sling-mock.%0A */%0Apublic class I18nTest %7B%0A%0A  @Rule%0A  public AemContext context = new AemContext();%0A%0A  @Test%0A  public void testI18n() %7B%0A    ResourceBundle resourceBundle = context.request().getResourceBundle(null);%0A    ((MockResourceBundle)resourceBundle).put(%22key1%22, %22value1%22);%0A%0A    I18n i18n = new I18n(resourceBundle);%0A%0A    assertEquals(%22value1%22, i18n.get(%22key1%22));%0A    assertEquals(%22key2%22, i18n.get(%22key2%22));%0A  %7D%0A%0A%7D%0A

Test AEM I18n object with resource bundle support from sling-mock.