### Question:
DefaultTextResolver extends EnumTextResolverWithPropertiesOverrideAndFallback { @Nonnull public static DefaultTextResolver getInstance () { final DefaultTextResolver ret = SingletonHolder.s_aInstance; s_bDefaultInstantiated = true; return ret; } private  DefaultTextResolver(); static boolean isInstantiated(); @Nonnull static DefaultTextResolver getInstance(); @Nullable static String getTextStatic(@Nonnull final Enum <?> aEnum, @Nonnull final IHasText aTP, @Nonnull final Locale aContentLocale); @Nullable @Deprecated @DevelopersNote ("Use getTextStatic instead when no argument is needed!") static String getTextWithArgsStatic(@Nonnull final Enum <?> aEnum,
                                              @Nonnull final IHasTextWithArgs aTP,
                                              @Nonnull final Locale aContentLocale); @Nullable static String getTextWithArgsStatic(@Nonnull final Enum <?> aEnum,
                                              @Nonnull final IHasTextWithArgs aTP,
                                              @Nonnull final Locale aContentLocale,
                                              @Nullable final Object... aArgs);  }### Answer:
@Test public void testGetText () { final Locale aDE = TextHelper.DE; final Locale aDE_AT = LocaleCache.getInstance ().getLocale ("de", "AT"); final Locale aEN = TextHelper.EN; final Locale aEN_US = LocaleCache.getInstance ().getLocale ("en", "US"); final Locale aSR = LocaleCache.getInstance ().getLocale ("sr", "RS"); assertEquals ("Text1de", EText.TEXT1.getDisplayText (aDE)); assertEquals ("Text1de", EText.TEXT1.getDisplayText (aDE_AT)); assertEquals ("Text1en", EText.TEXT1.getDisplayText (aEN)); assertEquals ("Text1en", EText.TEXT1.getDisplayText (aEN_US)); assertEquals ("Text2de-override", EText.TEXT2.getDisplayText (aDE)); assertEquals ("Text2de-override", EText.TEXT2.getDisplayText (aDE_AT)); assertEquals ("Text2en", EText.TEXT2.getDisplayText (aEN)); assertEquals ("Text2en", EText.TEXT2.getDisplayText (aEN_US)); assertNull (EText.TEXT1.getDisplayText (aSR)); assertNull (EText.TEXT2.getDisplayText (aSR)); assertTrue (DefaultTextResolver.getInstance ().getAllUsedOverrideBundleNames ().contains ("properties/override-de")); assertFalse (DefaultTextResolver.getInstance ().getAllUsedOverrideBundleNames ().contains ("properties/override-en")); assertFalse (DefaultTextResolver.getInstance ().getAllUsedFallbackBundleNames ().contains ("properties/sr_RS")); }
@Test public void testGetTextWithArgs () { final Locale aDE = TextHelper.DE; final Locale aEN = TextHelper.EN; assertEquals ("Text3abcde", EText.TEXT3.getDisplayTextWithArgs (aDE, "abc")); assertEquals ("Text3abcen", EText.TEXT3.getDisplayTextWithArgs (aEN, "abc")); assertEquals (EText.TEXT3.getDisplayText (aEN), EText.TEXT3.getDisplayTextWithArgs (aEN, new Object [] {})); assertEquals (EText.TEXT3.getDisplayText (aEN), EText.TEXT3.getDisplayTextWithArgs (aEN, (Object []) null)); DefaultTextResolver.getInstance ().clearCache (); assertEquals ("Text3abcde", EText.TEXT3.getDisplayTextWithArgs (aDE, "abc")); assertEquals ("Text3abcen", EText.TEXT3.getDisplayTextWithArgs (aEN, "abc")); }