FormattedStringToNumber converter = new FormattedStringToNumber();
DefaultNumberFormatFactory numberFormatFactory = new DefaultNumberFormatFactory();
numberFormatFactory.setLocale(Locale.US);
converter.setNumberFormatFactory(numberFormatFactory);
service.addConverter("usaNumber", converter);
ConversionExecutor executor = service.getConversionExecutor("usaNumber", String.class, Integer.class);
Integer three = (Integer) executor.execute("3,000");
assertEquals(3000, three.intValue());
ConversionExecutor executor2 = service.getConversionExecutor("usaNumber", Integer.class, String.class);
String string = (String) executor2.execute(new Integer(3000));
assertEquals("3,000", string);
}