### Question:
MapInjectionResolver extends InjectionResolver<Param> { static String getParamValueString(final ParameterMap parameters, final Param param, final AnnotatedElement target, final ExecutionContext context) { String paramValueStr = getParameterValue(parameters, CommandModel.getParamName(param, target), true); if (paramValueStr == null && param.alias().length() > 0) { paramValueStr = getParameterValue(parameters, param.alias(), true); } if (paramValueStr == null) { paramValueStr = parameters.getOne(param.shortName()); } if (paramValueStr == null) { final String defaultValue = param.defaultValue(); paramValueStr = defaultValue.equals("") ? null : defaultValue; } if (paramValueStr == null) { Class<? extends ParamDefaultCalculator> dc = param.defaultCalculator(); if (dc != ParamDefaultCalculator.class) { try { ParamDefaultCalculator pdc = dc.newInstance(); paramValueStr = pdc.defaultValue(context); } catch (InstantiationException | IllegalAccessException ex) { Logger.getLogger(MapInjectionResolver.class.getName()).log(Level.SEVERE, null, ex); } } } return paramValueStr; } MapInjectionResolver(CommandModel model,
					ParameterMap parameters);  MapInjectionResolver(CommandModel model,
					ParameterMap parameters,
                                        final MultiMap<String,File> optionNameToUploadedFileMap); void setContext(ExecutionContext context); @Override boolean isOptional(AnnotatedElement element, Param annotation); @Override V getValue(Object component, AnnotatedElement target, Type genericType, Class<V> type); static String getUploadedFileParamValue(final String fieldName,
                final Class fieldType,
                final MultiMap<String,File> optionNameToFileMap); static List<String> getUploadedFileParamValues(
                final String fieldName,
                final Class fieldType,
                final MultiMap<String,File> optionNameToFileMap); static Object convertListToObject(AnnotatedElement target,
                                    Class type, List<String> paramValList); static final LocalStringManagerImpl localStrings; }### Answer:
@Test public void getParamValueStringTest() { try { DummyCommand dc = new DummyCommand(); Class<?> cl = dc.getClass(); AnnotatedElement ae = (AnnotatedElement)cl.getDeclaredField("foo"); Param param = ae.getAnnotation(Param.class); ParameterMap params = new ParameterMap(); params.set("foo", "true"); String val = MapInjectionResolver.getParamValueString(params, param, ae, null); assertEquals("val should be true", "true", val); ae = (AnnotatedElement)cl.getDeclaredField("bar"); param = ae.getAnnotation(Param.class); val = MapInjectionResolver.getParamValueString(params, param, ae, null); assertEquals("val should be false", "false", val); ae = (AnnotatedElement)cl.getDeclaredField("hello"); param = ae.getAnnotation(Param.class); val = MapInjectionResolver.getParamValueString(params, param, ae, null); assertEquals("val should be null", null, val); ae = (AnnotatedElement)cl.getDeclaredField("dyn"); param = ae.getAnnotation(Param.class); val = MapInjectionResolver.getParamValueString(params, param, ae, null); assertEquals("val should be dynamic-default-value", "dynamic-default-value", val); } catch (Exception ex) { ex.printStackTrace(); } }