### Question:
TextHelper { @Nullable public static String getFormattedText (@Nullable final String sText, @Nullable final Object... aArgs) { if (sText == null) { return null; } if (ArrayHelper.isEmpty (aArgs)) { return sText; } final MessageFormat aMF = new MessageFormat (sText, Locale.getDefault (Locale.Category.FORMAT)); return aMF.format (aArgs); } private  TextHelper(); @Nullable static String getFormattedText(@Nullable final String sText, @Nullable final Object... aArgs); @Nullable static String getFormattedText(@Nonnull final Locale aDisplayLocale,
                                         @Nullable final String sText,
                                         @Nullable final Object... aArgs); @Nonnull @ReturnsMutableCopy static MultilingualText create_DE(@Nonnull final String sDE); @Nonnull @ReturnsMutableCopy static MultilingualText create_EN(@Nonnull final String sEN); @Nonnull @ReturnsMutableCopy static MultilingualText create_DE_EN(@Nonnull final String sDE, @Nonnull final String sEN); @Nonnull @ReturnsMutableCopy static MultilingualText getCopyWithLocales(@Nonnull final IMultilingualText aMLT,
                                                     @Nonnull final Collection <Locale> aContentLocales); @Nonnull @ReturnsMutableCopy static MultilingualText createMultilingualTextFromMap(@Nonnull final Map <String, String> aMap); static final Locale DE; static final Locale EN; }### Answer:
@Test public void testGetFormattedText () { assertEquals ("a", TextHelper.getFormattedText ("a", (Object []) null)); assertEquals ("a", TextHelper.getFormattedText ("a", new Object [0])); assertEquals ("a{0}", TextHelper.getFormattedText ("a{0}", new Object [0])); assertEquals ("anull", TextHelper.getFormattedText ("a{0}", (Object) null)); assertEquals ("ab", TextHelper.getFormattedText ("a{0}", "b")); assertEquals ("ab{1}", TextHelper.getFormattedText ("a{0}{1}", "b")); assertEquals ("anull{1}", TextHelper.getFormattedText ("a{0}{1}", (Object) null)); assertNull (TextHelper.getFormattedText ((String) null, "b")); }