Tests run: 15, Failures: 0, Errors: 2, Skipped: 0, Time elapsed: 1.907 sec <<< FAILURE! - in br.eng.mauriciofreitas.unit.TestUsers
incrementExistingPoints(br.eng.mauriciofreitas.unit.TestUsers) Time elapsed: 0.023 sec <<< ERROR!
org.postgresql.util.PSQLException: ERROR: update or delete on table "users" violates foreign key constraint "post_login_fkey" on table "posts"
Detail: Key (login)=(mauricio) is still referenced from table "posts".
at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2458)
at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2158)
at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:291)
at org.postgresql.jdbc.PgStatement.executeInternal(PgStatement.java:432)
at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:358)
at org.postgresql.jdbc.PgStatement.executeWithFlags(PgStatement.java:305)
at org.postgresql.jdbc.PgStatement.executeCachedSql(PgStatement.java:291)
at org.postgresql.jdbc.PgStatement.executeWithFlags(PgStatement.java:269)
at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:265)
at org.dbunit.database.statement.SimpleStatement.executeBatch(SimpleStatement.java:69)
at org.dbunit.operation.DeleteAllOperation.execute(DeleteAllOperation.java:126)
at org.dbunit.operation.CompositeOperation.execute(CompositeOperation.java:79)
at org.dbunit.AbstractDatabaseTester.executeOperation(AbstractDatabaseTester.java:199)
at org.dbunit.AbstractDatabaseTester.onSetup(AbstractDatabaseTester.java:109)
at br.eng.mauriciofreitas.unit.TestUsers.setupDatabase(TestUsers.java:219)
at br.eng.mauriciofreitas.unit.TestUsers.incrementExistingPoints(TestUsers.java:142)
Seems to be a problem with DBUnit.