### Question:
Names { public static String variableName(String... name) { Matcher m = LEADING_UNDERSCORES.matcher(name[0]); if (m.find()) { return m.group() + smallCamel(name); } else { return checkForReservedWord(smallCamel(name)); } } private  Names(); static String typeName(String... name); static String methodName(String... name); static String variableName(String... name); static String resourceMethodName(GResource resource, GMethod method); static String responseClassName(GResource resource, GMethod method); static String javaTypeName(Resource resource, TypeDeclaration declaration); static String javaTypeName(Resource resource, Method method, TypeDeclaration declaration); static String ramlTypeName(Resource resource, Method method, TypeDeclaration declaration); static String ramlTypeName(Resource resource, TypeDeclaration declaration); static String javaTypeName(Resource resource, Method method, Response response,
                                    TypeDeclaration declaration); static String ramlTypeName(Resource resource, Method method, Response response,
                                    TypeDeclaration declaration); static String ramlTypeName(org.raml.v2.api.model.v08.resources.Resource resource,
                                    org.raml.v2.api.model.v08.methods.Method method, BodyLike typeDeclaration); static String ramlTypeName(org.raml.v2.api.model.v08.resources.Resource resource,
                                    org.raml.v2.api.model.v08.methods.Method method,
                                    org.raml.v2.api.model.v08.bodies.Response response, BodyLike typeDeclaration); static String javaTypeName(org.raml.v2.api.model.v08.resources.Resource resource,
                                    org.raml.v2.api.model.v08.methods.Method method, BodyLike typeDeclaration); static String javaTypeName(org.raml.v2.api.model.v08.resources.Resource resource,
                                    org.raml.v2.api.model.v08.methods.Method method,
                                    org.raml.v2.api.model.v08.bodies.Response response, BodyLike typeDeclaration);  }### Answer:
@Test public void buildVariableName() throws Exception { assertEquals("funAllo", Names.variableName("funAllo")); assertEquals("funAllo", Names.variableName("FunAllo")); assertEquals("funAllo", Names.variableName("Fun", "allo")); assertEquals("funAllo", Names.variableName("fun", "_allo")); assertEquals("funAllo", Names.variableName("fun", "allo")); assertEquals("root", Names.variableName("")); assertEquals("fun", Names.variableName("/fun")); assertEquals("fun", Names.variableName("/fun")); assertEquals("funAllo", Names.variableName(" assertEquals("funAllo", Names.variableName("fun allo")); assertEquals("funAllo", Names.variableName("fun_allo")); }
@Test public void buildVariableReservedWord() throws Exception { assertEquals("ifVariable", Names.variableName("if")); assertEquals("classVariable", Names.variableName("class")); }
@Test public void buildVariableWithUnderscore() throws Exception { assertEquals("_funAllo", Names.variableName("_funAllo")); assertEquals("_funAllo", Names.variableName("_FunAllo")); assertEquals("_funAllo", Names.variableName("_Fun", "allo")); assertEquals("_funAllo", Names.variableName("_fun", "_allo")); }