### Question:
MaskLeavingLastFourDigitStandardizer extends SimpleRegexReplacer implements StandardizationPolicy { @Override public String convertValue(String value) { if (value.length() > 4) { return super.convertValue(value.substring(0, value.length() - 4)) + value.substring(value.length() - 4); } return value; } private  MaskLeavingLastFourDigitStandardizer(); static MaskLeavingLastFourDigitStandardizer instance(); @Override String convertValue(String value);  }### Answer:
@Test public void testConvertValue() throws Exception { MaskLeavingLastFourDigitStandardizer cc = MaskLeavingLastFourDigitStandardizer.instance(); assertEquals("XXXXXXXXXXXX8790", cc.convertValue("5100145505218790")); assertEquals("XXXX-XXXX-XXXX-8790", cc.convertValue("5100-1455-0521-8790")); assertEquals("XXX-XX-2015", cc.convertValue("560-60-2015")); assertEquals("2015", cc.convertValue("2015")); assertEquals("20", cc.convertValue("20")); assertEquals("", cc.convertValue("")); assertEquals("XXXXXXXXXXX9966", cc.convertValue("373327123279966")); }