DefaultSequenceMaxValueIncrementerFactory implements DataFieldMaxValueIncrementerFactory { @Override public DataFieldMaxValueIncrementer getIncrementer(String incrementerType, String incrementerName) { DatabaseType databaseType = DatabaseType.valueOf(incrementerType.toUpperCase()); DataFieldMaxValueIncrementer result; if (databaseType == HSQL) { result = new HsqlSequenceMaxValueIncrementer(dataSource, incrementerName); } else { result = delegate.getIncrementer(incrementerType, incrementerName); } return result; } DefaultSequenceMaxValueIncrementerFactory(DataSource dataSource); void setIncrementerColumnName(String incrementerColumnName); @Override DataFieldMaxValueIncrementer getIncrementer(String incrementerType, String incrementerName); @Override boolean isSupportedIncrementerType(String databaseType); @Override String[] getSupportedIncrementerTypes();  }
@Test public void testGetIncrementer() throws Exception { for (DatabaseType type : DatabaseType.values()) { if (type != DatabaseType.DB2VSE && type != DatabaseType.DB2AS400) { Assert.assertNotNull(sequenceMaxValueIncrementerFactory.getIncrementer(type.name(), "bar")); } } }