/**
* Gets the default function library from Citrus Spring bean configuration.
* @return
*/
public FunctionLibrary getDefaultFunctionLibrary() {
FunctionLibrary library = new ObjectFactory().createFunctionLibrary();
FunctionConfig config = new FunctionConfig();
com.consol.citrus.functions.FunctionLibrary defaultFunctionLibrary = config.getFunctionaLibrary();
library.setId(defaultFunctionLibrary.getName());
library.setPrefix(defaultFunctionLibrary.getPrefix());
for (Map.Entry<String, Function> functionEntry : defaultFunctionLibrary.getMembers().entrySet()) {
FunctionLibrary.Function function = new FunctionLibrary.Function();
function.setName(functionEntry.getKey());
function.setClazz(functionEntry.getValue().getClass().getName());
library.getFunctions().add(function);
}
return library;
}