CheckboxMultipleDDMFormFieldValueRequestParameterRetriever implements DDMFormFieldValueRequestParameterRetriever { @Override public String get( HttpServletRequest httpServletRequest, String ddmFormFieldParameterName, String defaultDDMFormFieldParameterValue) { String[] parameterValues = getParameterValues( httpServletRequest, ddmFormFieldParameterName, getDefaultDDMFormFieldParameterValues( defaultDDMFormFieldParameterValue)); return jsonFactory.serialize(parameterValues); }  @Override String get(
		HttpServletRequest httpServletRequest, String ddmFormFieldParameterName,
		String defaultDDMFormFieldParameterValue);  }
@Test public void testCompletedSubmission() { String expectedResult = createJSONArrayString("Option 2"); String defaultDDMFormFieldParameterValue = createJSONArrayString( "Option 1"); String actualResult = _checkboxMultipleDDMFormFieldValueRequestParameterRetriever.get( createHttpServletRequest("Option 2"), _CHECKBOX_MULTIPLE_SUBMISSION, defaultDDMFormFieldParameterValue); Assert.assertEquals(expectedResult, actualResult); }
@Test public void testEmptySubmission() { String expectedResult = "[]"; String defaultDDMFormFieldParameterValue = createJSONArrayString( "Option 1"); String actualResult = _checkboxMultipleDDMFormFieldValueRequestParameterRetriever.get( createHttpServletRequest(), _CHECKBOX_MULTIPLE_SUBMISSION, defaultDDMFormFieldParameterValue); Assert.assertEquals(expectedResult, actualResult); }