@Test
    void integerValid() {
        BigDecimalValidator validator = BigDecimalValidator.getInstance();
        BigDecimal expected = new BigDecimal("1234");
        BigDecimal negative = new BigDecimal("-1234");

        assertEquals(expected, validator.validate("1.234", EC), "EC locale");
        assertEquals(negative, validator.validate("-1.234", EC), "EC negative");

        assertEquals(expected, validator.validate("1,234", US), "US locale");
        assertEquals(negative, validator.validate("-1,234", US), "US negative");
    }
Test Valid integer (non-decimal) currency values
primefaces/src/test/java/org/primefaces/util/BigDecimalValidatorTest.java