### Question:
ReportInputControlValuesInformationLoader { public static ReportInputControlValuesInformation getReportInputControlValuesInformation( ListOfValues listOfValues, ResourceBundle resourceBundle, MessageSource messageSource) { ReportInputControlValuesInformationImpl valuesInformation = null; if (listOfValues != null){ valuesInformation = new ReportInputControlValuesInformationImpl(); ListOfValuesItem[] listOfValuesItem = listOfValues.getValues(); for (ListOfValuesItem valuesItem : listOfValuesItem) { ReportInputControlValueInformationImpl valueInformation = new ReportInputControlValueInformationImpl(); valueInformation.setPromptLabel(InputControlLabelResolver.resolve(valuesItem.getLabel(), resourceBundle, messageSource)); valueInformation.setDefaultValue(valuesItem.getValue()); valuesInformation.setInputControlValueInformation(valuesItem.getLabel(), valueInformation); } } return valuesInformation; }  static ReportInputControlValuesInformation getReportInputControlValuesInformation(
            ListOfValues listOfValues, ResourceBundle resourceBundle, MessageSource messageSource);  }### Answer:
@Test public void ensureValuesInfoResolvedIfKeyPresentInMessageSource() throws Exception { MessageSource messageSource = mockMessageSource(map(entry("key", "value"))); final ListOfValues listOfValues = mockListOfValues(getLOVI("$R{key}", "tttt")); ReportInputControlValuesInformation info = ReportInputControlValuesInformationLoader.getReportInputControlValuesInformation(listOfValues, null, messageSource); assertNotNull(info); assertEquals("value", info.getInputControlValueInformation("$R{key}").getPromptLabel()); }
@Test public void ensureValuesInfoResolvedIfKeyPresentInResourceBundle() throws Exception { ResourceBundle reportResourceBundle = new ResourceBundleMock(map(entry("key", "value"))); final ListOfValues listOfValues = mockListOfValues(getLOVI("$R{key}", "tttt")); ReportInputControlValuesInformation info = ReportInputControlValuesInformationLoader.getReportInputControlValuesInformation(listOfValues, reportResourceBundle, null); assertNotNull(info); assertEquals("value", info.getInputControlValueInformation("$R{key}").getPromptLabel()); }
@Test public void ensureValuesInfoResolvedIfNoMessagesPresent() throws Exception { MessageSource messageSource = mockMessageSource(map(entry("key1", "messageSourceValue"))); ResourceBundle reportResourceBundle = new ResourceBundleMock(map(entry("key1", "reportBundleValue"))); final ListOfValues listOfValues = mockListOfValues(getLOVI("$R{key}", "tttt")); ReportInputControlValuesInformation info = ReportInputControlValuesInformationLoader.getReportInputControlValuesInformation(listOfValues, reportResourceBundle, messageSource); assertNotNull(info); assertEquals("$R{key}", info.getInputControlValueInformation("$R{key}").getPromptLabel()); }