### Question:
SolidityFunctionWrapper extends Generator { Iterable<FieldSpec> buildFuncNameConstants(List<AbiDefinition> functionDefinitions) { List<FieldSpec> fields = new ArrayList<>(); Set<String> fieldNames = new HashSet<>(); fieldNames.add(Contract.FUNC_DEPLOY); for (AbiDefinition functionDefinition : functionDefinitions) { if (functionDefinition.getType().equals("function")) { String funcName = functionDefinition.getName(); if (!fieldNames.contains(funcName)) { FieldSpec field = FieldSpec.builder(String.class, funcNameToConst(funcName), Modifier.PUBLIC, Modifier.STATIC, Modifier.FINAL) .initializer("$S", funcName) .build(); fields.add(field); fieldNames.add(funcName); } } } return fields; } SolidityFunctionWrapper(boolean useNativeJavaTypes);   SolidityFunctionWrapper(boolean useNativeJavaTypes, GenerationReporter reporter); @SuppressWarnings("unchecked") void generateJavaFiles(
            String contractName, String bin, String abi, String destinationDir,
            String basePackageName);  }### Answer:
@Test public void testBuildFuncNameConstants() throws Exception { AbiDefinition functionDefinition = new AbiDefinition( false, Arrays.asList( new AbiDefinition.NamedType("param", "uint8")), "functionName", Collections.emptyList(), "function", true); TypeSpec.Builder builder = TypeSpec.classBuilder("testClass"); builder.addFields(solidityFunctionWrapper .buildFuncNameConstants(Collections.singletonList(functionDefinition))); String expected = "class testClass {\n" + " public static final java.lang.String FUNC_FUNCTIONNAME = \"functionName\";\n" + "}\n"; assertThat(builder.build().toString(), is(expected)); }