### Question:
MaskLeavingLastFourDigitStandardizer extends SimpleRegexReplacer implements StandardizationPolicy { public static MaskLeavingLastFourDigitStandardizer instance() { return instance; } private  MaskLeavingLastFourDigitStandardizer(); static MaskLeavingLastFourDigitStandardizer instance(); @Override String convertValue(String value);  }### Answer:
@Test public void testAcceptValidType() { MaskLeavingLastFourDigitStandardizer cc = MaskLeavingLastFourDigitStandardizer.instance(); assertTrue(cc.accepts("XXXXXXXXXXX9966")); }
@Test public void testAcceptInvalidType() { MaskLeavingLastFourDigitStandardizer cc = MaskLeavingLastFourDigitStandardizer.instance(); Double doubleValue = 1000.05d; assertFalse(cc.accepts(doubleValue)); }
@Test public void testConvertRawValueValidType() { Object expectedValue = "XXXXXXXXXXXX8790"; Object rawValue = "5100145505218790"; MaskLeavingLastFourDigitStandardizer cc = MaskLeavingLastFourDigitStandardizer.instance(); assertEquals(expectedValue, cc.convertRawValue(rawValue)); }
@Test public void testConvertRawValueInvalidType() { Object expectedValue = Double.valueOf("100000.05"); Object rawValue = Double.valueOf("100000.05"); MaskLeavingLastFourDigitStandardizer cc = MaskLeavingLastFourDigitStandardizer.instance(); assertEquals(expectedValue, cc.convertRawValue(rawValue)); }