@@ -0,0 +1,956 @@
+package org.wildfly.security.auth.util;%0A%0Aimport org.junit.Test;%0Aimport java.util.regex.Pattern;%0A%0Aimport static org.junit.Assert.assertEquals;%0A%0Apublic class RegexNameRewriterTest %7B%0A%0A    private static final String BEFORE_REPLACE_USER_NAME = %22.user.%22;%0A    private static final String AFTER_REPLACE_ALL_USER_NAME = %22dotuserdot%22;%0A    private static final String AFTER_REPLACE_USER_NAME = %22dotuser.%22;%0A%0A    @Test%0A    public void testRegexNameRewriter() %7B%0A        Pattern pattern = Pattern.compile(%22%5C%5C.%22);%0A%0A        RegexNameRewriter regexNameRewriter = new RegexNameRewriter(pattern, %22dot%22, true);%0A        String regexName = regexNameRewriter.rewriteName(BEFORE_REPLACE_USER_NAME);%0A        assertEquals(AFTER_REPLACE_ALL_USER_NAME, regexName);%0A%0A        regexNameRewriter = new RegexNameRewriter(pattern, %22dot%22, false);%0A        regexName = regexNameRewriter.rewriteName(BEFORE_REPLACE_USER_NAME);%0A        assertEquals(AFTER_REPLACE_USER_NAME, regexName);%0A    %7D%0A%0A%7D%0A

Add a test class for RegexNameRewriter