ConfigUtil { static int getNumberOfDecimalPlaces(BigDecimal bigDecimal) { return Math.max(0, bigDecimal.stripTrailingZeros().scale()); }  static @Nullable Object getDefaultValueAsCorrectType(ConfigDescriptionParameter parameter); static void applyDefaultConfiguration(Configuration configuration,
            @Nullable ConfigDescription configDescription); static Map<String, @Nullable Object> normalizeTypes(Map<String, @Nullable Object> configuration); static Object normalizeType(Object value, @Nullable ConfigDescriptionParameter configDescriptionParameter); static @Nullable Map<String, Object> normalizeTypes(@Nullable Map<String, Object> configuration,
            List<ConfigDescription> configDescriptions); static Object normalizeType(Object value);  }
@Test public void verifyGetNumberOfDecimalPlacesWorksCorrectly() { assertThat(ConfigUtil.getNumberOfDecimalPlaces(new BigDecimal("0.001")), is(3)); assertThat(ConfigUtil.getNumberOfDecimalPlaces(new BigDecimal("0.01")), is(2)); assertThat(ConfigUtil.getNumberOfDecimalPlaces(new BigDecimal("0.1")), is(1)); assertThat(ConfigUtil.getNumberOfDecimalPlaces(new BigDecimal("1.000")), is(0)); assertThat(ConfigUtil.getNumberOfDecimalPlaces(new BigDecimal("1.00")), is(0)); assertThat(ConfigUtil.getNumberOfDecimalPlaces(new BigDecimal("1.0")), is(0)); assertThat(ConfigUtil.getNumberOfDecimalPlaces(BigDecimal.ONE), is(0)); assertThat(ConfigUtil.getNumberOfDecimalPlaces(new BigDecimal("10")), is(0)); assertThat(ConfigUtil.getNumberOfDecimalPlaces(new BigDecimal("100")), is(0)); assertThat(ConfigUtil.getNumberOfDecimalPlaces(new BigDecimal("100.1")), is(1)); assertThat(ConfigUtil.getNumberOfDecimalPlaces(new BigDecimal("100.01")), is(2)); assertThat(ConfigUtil.getNumberOfDecimalPlaces(new BigDecimal("100.001")), is(3)); }