@Test
public void getConstantMethodDeclaration() {

    Constant constant = constantSupplier.get();
    int methodArity = new Random().nextInt(20);
    MethodDeclaration retrieved = DerivedFieldFunctionUtils.getConstantMethodDeclaration(constant, DOUBLE_CLASS,
                                                                                         methodArity,
                                                                                         DEFAULT_PARAMETERTYPE_MAP);
    String expectedVariable = String.format("%s constantVariable = %s;", Double.class.getName(),
                                            constant.getValue());
    commonValidateConstant(retrieved, constant, methodArity, Double.class.getName(), expectedVariable);
    //
    constant = new Constant();
    constant.setDataType(DataType.STRING);
    constant.setValue("EXPECTED");
    methodArity = new Random().nextInt(20);
    expectedVariable = String.format("%s constantVariable = \"%s\";", String.class.getName(), constant.getValue());
    retrieved = DerivedFieldFunctionUtils.getConstantMethodDeclaration(constant, STRING_CLASS, methodArity, DEFAULT_PARAMETERTYPE_MAP);
    commonValidateConstant(retrieved, constant, methodArity, String.class.getName(), expectedVariable);
}