### Question:
RegExHelper { @Nullable public static String getAsIdentifier (@Nullable final String s) { return getAsIdentifier (s, "_"); } private  RegExHelper(); @Nonnull static String [] getSplitToArray(@Nullable final CharSequence sText, @Nonnull @RegEx final String sRegEx); @Nonnull static String [] getSplitToArray(@Nullable final CharSequence sText,
                                           @Nonnull @RegEx final String sRegEx,
                                           @Nonnegative final int nLimit); @Nonnull static ICommonsList <String> getSplitToList(@Nullable final CharSequence sText, @Nonnull @RegEx final String sRegEx); @Nonnull static ICommonsList <String> getSplitToList(@Nullable final CharSequence sText,
                                                      @Nonnull @RegEx final String sRegEx,
                                                      @Nonnegative final int nLimit); @Nonnull static Matcher getMatcher(@Nonnull @RegEx final String sRegEx, @Nonnull final String sValue); @Nonnull static Matcher getMatcher(@Nonnull @RegEx final String sRegEx, @Nonnegative final int nOptions, @Nonnull final String sValue); static boolean stringMatchesPattern(@Nonnull @RegEx final String sRegEx, @Nonnull final String sValue); static boolean stringMatchesPattern(@Nonnull @RegEx final String sRegEx,
                                              @Nonnegative final int nOptions,
                                              @Nonnull final String sValue); @Nonnull static String stringReplacePattern(@Nonnull @RegEx final String sRegEx,
                                             @Nonnull final String sValue,
                                             @Nullable final String sReplacement); @Nonnull static String stringReplacePattern(@Nonnull @RegEx final String sRegEx,
                                             @Nonnegative final int nOptions,
                                             @Nonnull final String sValue,
                                             @Nullable final String sReplacement); @Nullable static String getAsIdentifier(@Nullable final String s); @Nullable static String getAsIdentifier(@Nullable final String s, final char cReplacement); @Nullable static String getAsIdentifier(@Nullable final String s, @Nonnull final String sReplacement); static boolean isValidPattern(@Nonnull @RegEx final String sRegEx); @Nullable static String [] getAllMatchingGroupValues(@Nonnull @RegEx final String sRegEx, @Nonnull final String sValue);  }### Answer:
@Test public void testMakeIdentifier () { assertNull (RegExHelper.getAsIdentifier (null)); assertEquals ("", RegExHelper.getAsIdentifier ("")); assertEquals ("abc", RegExHelper.getAsIdentifier ("abc")); assertEquals ("ABC", RegExHelper.getAsIdentifier ("ABC")); assertEquals ("_0ABC", RegExHelper.getAsIdentifier ("0ABC")); assertEquals ("abc0ABC", RegExHelper.getAsIdentifier ("0ABC", "abc")); assertEquals ("_0ABC", RegExHelper.getAsIdentifier ("_0ABC")); assertEquals ("___", RegExHelper.getAsIdentifier (";;;")); assertEquals ("aaa", RegExHelper.getAsIdentifier (";;;", "a")); if (false) assertEquals ("$$$", RegExHelper.getAsIdentifier (";;;", "$")); assertEquals ("aaa", RegExHelper.getAsIdentifier (";;;", 'a')); assertEquals ("$$$", RegExHelper.getAsIdentifier (";;;", '$')); for (char c = Character.MIN_VALUE; c < Character.MAX_VALUE; ++c) { final int nLenExpected = c == '\\' ? 5 : Character.isJavaIdentifierStart (c) ? 3 : 4; assertEquals ((int) c + " <" + c + "> " + nLenExpected, StringHelper.getRepeated (c, nLenExpected), RegExHelper.getAsIdentifier (";;;", c)); } assertEquals ("^^^^", RegExHelper.getAsIdentifier (";;;", '^')); assertEquals ("", RegExHelper.getAsIdentifier (";;;", "")); }