### Question:
ColumnTypeUtil { public static DecimalInfo getDecimalInfo(String typeName, DecimalInfo defaultInfo){ if(!isDecimalType(typeName)){ throw new IllegalArgumentException("Unsupported column type:" + typeName); } if (typeName.contains(LEFT_BRACKETS) && typeName.contains(RIGHT_BRACKETS)){ int precision = Integer.parseInt(typeName.substring(typeName.indexOf(LEFT_BRACKETS) + 1,typeName.indexOf(DELIM)).trim()); int scale = Integer.parseInt(typeName.substring(typeName.indexOf(DELIM) + 1,typeName.indexOf(RIGHT_BRACKETS)).trim()); return new DecimalInfo(precision, scale); } else { return defaultInfo; } }  static boolean isDecimalType(String typeName); static DecimalInfo getDecimalInfo(String typeName, DecimalInfo defaultInfo);  }### Answer:
@Test public void testGetDecimalInfo() { ColumnTypeUtil.DecimalInfo defaultDecimal = new ColumnTypeUtil.DecimalInfo(10, 2); ColumnTypeUtil.DecimalInfo result = ColumnTypeUtil.getDecimalInfo("decimal", defaultDecimal); Assert.assertEquals(result, defaultDecimal); result = ColumnTypeUtil.getDecimalInfo("decimal(10,2)", null); Assert.assertEquals(result, defaultDecimal); try { ColumnTypeUtil.getDecimalInfo("int", null); } catch (Throwable e) { Assert.assertTrue(e instanceof IllegalArgumentException); } }