<commit_before>package org.springframework.batch.database.support;

import org.easymock.EasyMock;
import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;
import org.springframework.batch.item.database.support.DefaultDataFieldMaxValueIncrementerFactory;
import org.springframework.batch.support.DatabaseType;

import javax.sql.DataSource;

/**
 * @author Almex
 */
public class DefaultSequenceMaxValueIncrementerFactoryTest {

    private DefaultSequenceMaxValueIncrementerFactory sequenceMaxValueIncrementerFactory;
    private DataSource dataSource;

    @Before
    public void setUp() throws Exception {
        dataSource = EasyMock.createMock(DataSource.class);

        sequenceMaxValueIncrementerFactory = new DefaultSequenceMaxValueIncrementerFactory(dataSource);
        sequenceMaxValueIncrementerFactory.setIncrementerColumnName("foo");
    }

    @Test
    public void testGetIncrementer() throws Exception {
        for (DatabaseType type : DatabaseType.values()) {
            Assert.assertNotNull(sequenceMaxValueIncrementerFactory.getIncrementer(type.name(), "bar"));
        }
    }

    @Test
    public void testIsSupportedIncrementerType() throws Exception {
        for (DatabaseType type : DatabaseType.values()) {
            Assert.assertTrue(sequenceMaxValueIncrementerFactory.isSupportedIncrementerType(type.name()));
        }
    }

    @Test
    public void testGetSupportedIncrementerTypes() throws Exception {
        String[] actual = sequenceMaxValueIncrementerFactory.getSupportedIncrementerTypes();
        String[] expected = new DefaultDataFieldMaxValueIncrementerFactory(dataSource).getSupportedIncrementerTypes();

        Assert.assertArrayEquals(expected, actual);
    }
}<commit_msg>Fixed regression since update of Spring Batch<commit_after>package org.springframework.batch.database.support;

import org.easymock.EasyMock;
import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;
import org.springframework.batch.item.database.support.DefaultDataFieldMaxValueIncrementerFactory;
import org.springframework.batch.support.DatabaseType;

import javax.sql.DataSource;

/**
 * @author Almex
 */
public class DefaultSequenceMaxValueIncrementerFactoryTest {

    private DefaultSequenceMaxValueIncrementerFactory sequenceMaxValueIncrementerFactory;
    private DataSource dataSource;

    @Before
    public void setUp() throws Exception {
        dataSource = EasyMock.createMock(DataSource.class);

        sequenceMaxValueIncrementerFactory = new DefaultSequenceMaxValueIncrementerFactory(dataSource);
        sequenceMaxValueIncrementerFactory.setIncrementerColumnName("foo");
    }

    @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"));
            }
        }
    }

    @Test
    public void testIsSupportedIncrementerType() throws Exception {
        for (DatabaseType type : DatabaseType.values()) {
            Assert.assertTrue(sequenceMaxValueIncrementerFactory.isSupportedIncrementerType(type.name()));
        }
    }

    @Test
    public void testGetSupportedIncrementerTypes() throws Exception {
        String[] actual = sequenceMaxValueIncrementerFactory.getSupportedIncrementerTypes();
        String[] expected = new DefaultDataFieldMaxValueIncrementerFactory(dataSource).getSupportedIncrementerTypes();

        Assert.assertArrayEquals(expected, actual);
    }
}
{'fraction_non_alphanumeric': 0.08188105117565699, 'fraction_numerical': 0.0013831258644536654, 'mean_word_length': 4.397014925373134, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4746177', 'n_tokens_mistral': 937, 'n_tokens_neox': 915, 'n_words': 165}