### Question:
TableConfigUtils { public static void validateTableName(TableConfig tableConfig) { String tableName = tableConfig.getTableName(); if (tableName.contains(".") || tableName.contains(" ")) { throw new IllegalStateException("Table name: '" + tableName + "' containing '.' or space is not allowed"); } } private  TableConfigUtils(); static void validate(TableConfig tableConfig, @Nullable Schema schema); static void validateTableName(TableConfig tableConfig); static void validateRetentionConfig(TableConfig tableConfig);  }### Answer:
@Test public void testTableName() { String[] malformedTableName = {"test.table", "test table"}; for (int i = 0; i < 2; i++) { String tableName = malformedTableName[i]; TableConfig tableConfig = new TableConfigBuilder(TableType.OFFLINE).setTableName(tableName).build(); try { TableConfigUtils.validateTableName(tableConfig); Assert.fail("Should fail for malformed table name : " + tableName); } catch (IllegalStateException e) { } } }