### Question:
DefaultValueStandardizer implements StandardizationPolicy, AcceptsEmptyValues { public Object convertRawValue(Object value) { if (accepts(value)) { if (value == null ||(value instanceof String && StringUtils.isEmpty((String)value))) { return String.valueOf(defaultStr); } else { return convertValue(value.toString()); } } return value; } DefaultValueStandardizer(@PolicyPropertyRef(name = "Default Value") String defaultStr); @Override String convertValue(String value); String getDefaultStr(); Boolean accepts(Object value); Object convertRawValue(Object value);  }### Answer:
@Test public void testConvertRawValueValidType() throws Exception { DefaultValueStandardizer standardizer = new DefaultValueStandardizer("default"); assertEquals("default", standardizer.convertRawValue("")); assertEquals("default", standardizer.convertRawValue(null)); assertEquals("foo", standardizer.convertRawValue("foo")); }
@Test public void testConvertRawValueInvalidType() { DefaultValueStandardizer standardizer = new DefaultValueStandardizer("default"); Object expectedValue = Double.valueOf("1000.05"); Object rawValue = Double.valueOf("1000.05"); assertEquals(expectedValue, standardizer.convertRawValue(rawValue)); }