public static int precision(final Schema schema) {
    requireDecimal(schema);
    final String precisionString = schema.parameters().get(PRECISION_FIELD);
    if (precisionString == null) {
      return PRECISION_DEFAULT;
    }

    try {
      return Integer.parseInt(precisionString);
    } catch (final NumberFormatException e) {
      throw new KsqlException("Invalid precision parameter found in Decimal schema: ", e);
    }
  }
@Test
  public void shouldExtractPrecisionFromDecimalSchema() {
    // When:
    final int precision = DecimalUtil.precision(DECIMAL_SCHEMA);

    // Then:
    assertThat(precision, is(2));
  }