DefineFunctionUtils { static MethodDeclaration getConstantMethodDeclaration(final String methodName, final Constant constant, final ClassOrInterfaceType returnedType, final LinkedHashMap<String, ClassOrInterfaceType> parameterNameTypeMap) { return getConstantExpressionMethodDeclaration(methodName, constant, returnedType, parameterNameTypeMap); } private  DefineFunctionUtils();   }
@Test public void getConstantMethodDeclaration() { String methodName = "METHOD_NAME"; MethodDeclaration retrieved = DefineFunctionUtils.getConstantMethodDeclaration(methodName, constantSupplier.get(), DOUBLE_CLASS, DEFAULT_PARAMETERTYPE_MAP); String expected = String.format("java.lang.Double %s(java.util.List<org.kie.pmml.commons.model.tuples.KiePMMLNameValue> param1) {\n" + " java.lang.Double constantVariable = 34.6;\n" + " return constantVariable;\n" + "}", methodName); assertEquals(expected, retrieved.toString()); }