I'm testing a controller that returns a json response but the tests fail after the first time because the h2 database does not reset the auto increment id. Using fixtures or creating objects manually has a same problem.
@Before
public void setUp() {
Fixtures.deleteAllModels();
Fixtures.loadModels("data.yaml");
}
How to solve this problem?