DefineFunctionUtils { static LinkedHashMap<String, ClassOrInterfaceType> getNameClassOrInterfaceTypeMap(final List<ParameterField> parameterNameTypeMap) { final LinkedHashMap<String, ClassOrInterfaceType> toReturn = new LinkedHashMap<>(); if (parameterNameTypeMap != null) { parameterNameTypeMap.forEach(parameterField -> toReturn.put(parameterField.getName().toString(), parseClassOrInterfaceType(getBoxedClassName(parameterField)))); } return toReturn; } private  DefineFunctionUtils();   }
@Test public void getClassOrInterfaceTypes() { List<ParameterField> parameterFields = getParameterFields(); Map<String, ClassOrInterfaceType> retrieved = DefineFunctionUtils.getNameClassOrInterfaceTypeMap(parameterFields); assertEquals(parameterFields.size(), retrieved.size()); for (ParameterField parameter : parameterFields) { assertTrue(retrieved.containsKey(parameter.getName().toString())); commonVerifyParameterClassOrInterfaceType(retrieved.get(parameter.getName().toString()), parameter); } }