<commit_before>package org.osiam.client;

import com.github.springtestdbunit.DbUnitTestExecutionListener;
import com.github.springtestdbunit.annotation.DatabaseSetup;
import com.github.springtestdbunit.annotation.ExpectedDatabase;
import com.github.springtestdbunit.assertion.DatabaseAssertionMode;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.osiam.client.exception.ConflictException;
import org.osiam.client.exception.NoResultException;
import org.osiam.client.query.Query;
import org.osiam.client.query.metamodel.Group_;
import org.osiam.resources.scim.Group;
import org.osiam.resources.scim.SCIMSearchResult;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.TestExecutionListeners;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
import org.springframework.test.context.support.DependencyInjectionTestExecutionListener;

import java.util.UUID;

import static org.hamcrest.CoreMatchers.*;
import static org.junit.Assert.assertThat;
import static org.junit.Assert.fail;

@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration("/context.xml")
@TestExecutionListeners({DependencyInjectionTestExecutionListener.class,
        DbUnitTestExecutionListener.class})
@DatabaseSetup(value = "/database_seeds/EditGroupServiceIT/groups.xml")
//@DatabaseTearDown(value = "/database_tear_down.xml", type = DatabaseOperation.DELETE_ALL)
public class EditGroupServiceIT extends AbstractIntegrationTestBase {

    private String newId;
    private static final String IRRELEVANT = "irrelevant";
    private Group group;

    @Before
    public void setUp() {
        group = null;
        newId = UUID.randomUUID().toString();
    }

    @Test(expected = ConflictException.class)
    public void create_group_without_displayName_raises_exception() {
        group = new Group.Builder().build();
        createGroup();
        fail("Exception expected");
    }

    @Test(expected = ConflictException.class)
    public void create_group_with_empty_displayName_raises_exception() {
        group = new Group.Builder().setDisplayName("").build();
        createGroup();
        fail("Exception expected");
    }
<commit_msg>[fix] restored database teardown<commit_after>package org.osiam.client;

import com.github.springtestdbunit.DbUnitTestExecutionListener;
import com.github.springtestdbunit.annotation.DatabaseSetup;
import com.github.springtestdbunit.annotation.ExpectedDatabase;
import com.github.springtestdbunit.assertion.DatabaseAssertionMode;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.osiam.client.exception.ConflictException;
import org.osiam.client.exception.NoResultException;
import org.osiam.client.query.Query;
import org.osiam.client.query.metamodel.Group_;
import org.osiam.resources.scim.Group;
import org.osiam.resources.scim.SCIMSearchResult;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.TestExecutionListeners;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
import org.springframework.test.context.support.DependencyInjectionTestExecutionListener;

import java.util.UUID;

import static org.hamcrest.CoreMatchers.*;
import static org.junit.Assert.assertThat;
import static org.junit.Assert.fail;

@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration("/context.xml")
@TestExecutionListeners({DependencyInjectionTestExecutionListener.class,
        DbUnitTestExecutionListener.class})
@DatabaseSetup(value = "/database_seeds/EditGroupServiceIT/groups.xml")
@DatabaseTearDown(value = "/database_tear_down.xml", type = DatabaseOperation.DELETE_ALL)
public class EditGroupServiceIT extends AbstractIntegrationTestBase {

    private String newId;
    private static final String IRRELEVANT = "irrelevant";
    private Group group;

    @Before
    public void setUp() {
        group = null;
        newId = UUID.randomUUID().toString();
    }

    @Test(expected = ConflictException.class)
    public void create_group_without_displayName_raises_exception() {
        group = new Group.Builder().build();
        createGroup();
        fail("Exception expected");
    }

    @Test(expected = ConflictException.class)
    public void create_group_with_empty_displayName_raises_exception() {
        group = new Group.Builder().setDisplayName("").build();
        createGroup();
        fail("Exception expected");
    }

{'fraction_non_alphanumeric': 0.09926552414867572, 'fraction_numerical': 0.0013354106387714222, 'mean_word_length': 5.401709401709402, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 6}, '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': '823358', 'n_tokens_mistral': 1255, 'n_tokens_neox': 1237, 'n_words': 211}