diff --git a/ccm-core/src/main/java/org/libreccm/messaging/Thread.java b/ccm-core/src/main/java/org/libreccm/messaging/MessageThread.java
similarity index 92%
rename from ccm-core/src/main/java/org/libreccm/messaging/Thread.java
rename to ccm-core/src/main/java/org/libreccm/messaging/MessageThread.java
index b9bbe5351..3c66babaa 100644
--- a/ccm-core/src/main/java/org/libreccm/messaging/Thread.java
+++ b/ccm-core/src/main/java/org/libreccm/messaging/MessageThread.java
@@ -34,7 +34,7 @@ import javax.persistence.Table;
*/
@Entity
@Table(name = "threads")
-public class Thread extends CcmObject implements Serializable {
+public class MessageThread extends CcmObject implements Serializable {
private static final long serialVersionUID = -395123286904985770L;
@@ -65,7 +65,7 @@ public class Thread extends CcmObject implements Serializable {
if (getClass() != obj.getClass()) {
return false;
}
- final Thread other = (Thread) obj;
+ final MessageThread other = (MessageThread) obj;
if (!other.canEqual(this)) {
return false;
}
@@ -75,7 +75,7 @@ public class Thread extends CcmObject implements Serializable {
@Override
public boolean canEqual(final Object obj) {
- return obj instanceof Thread;
+ return obj instanceof MessageThread;
}
@Override
diff --git a/ccm-core/src/test/java/org/libreccm/categorization/EqualsAndHashCodeTest.java b/ccm-core/src/test/java/org/libreccm/categorization/EqualsAndHashCodeTest.java
index 302a1a69e..7a160427e 100644
--- a/ccm-core/src/test/java/org/libreccm/categorization/EqualsAndHashCodeTest.java
+++ b/ccm-core/src/test/java/org/libreccm/categorization/EqualsAndHashCodeTest.java
@@ -20,7 +20,7 @@ package org.libreccm.categorization;
import org.junit.runner.RunWith;
import org.junit.runners.Parameterized;
-import org.libreccm.jpautils.EqualsVerifier;
+import org.libreccm.testutils.EqualsVerifier;
import org.libreccm.tests.categories.UnitTest;
import java.util.Arrays;
diff --git a/ccm-core/src/test/java/org/libreccm/categorization/ToStringTest.java b/ccm-core/src/test/java/org/libreccm/categorization/ToStringTest.java
index 796ab78e2..4656d8fc0 100644
--- a/ccm-core/src/test/java/org/libreccm/categorization/ToStringTest.java
+++ b/ccm-core/src/test/java/org/libreccm/categorization/ToStringTest.java
@@ -20,7 +20,7 @@ package org.libreccm.categorization;
import org.junit.runner.RunWith;
import org.junit.runners.Parameterized;
-import org.libreccm.jpautils.ToStringVerifier;
+import org.libreccm.testutils.ToStringVerifier;
import org.libreccm.tests.categories.UnitTest;
import java.util.Arrays;
diff --git a/ccm-core/src/test/java/org/libreccm/core/EqualsAndHashCodeTest.java b/ccm-core/src/test/java/org/libreccm/core/EqualsAndHashCodeTest.java
index aff93d2f1..71243561f 100644
--- a/ccm-core/src/test/java/org/libreccm/core/EqualsAndHashCodeTest.java
+++ b/ccm-core/src/test/java/org/libreccm/core/EqualsAndHashCodeTest.java
@@ -21,7 +21,7 @@ package org.libreccm.core;
import org.junit.experimental.categories.Category;
import org.junit.runner.RunWith;
import org.junit.runners.Parameterized;
-import org.libreccm.jpautils.EqualsVerifier;
+import org.libreccm.testutils.EqualsVerifier;
import org.libreccm.tests.categories.UnitTest;
import java.util.Arrays;
diff --git a/ccm-core/src/test/java/org/libreccm/core/ToStringTest.java b/ccm-core/src/test/java/org/libreccm/core/ToStringTest.java
index 827cb6b20..971a870df 100644
--- a/ccm-core/src/test/java/org/libreccm/core/ToStringTest.java
+++ b/ccm-core/src/test/java/org/libreccm/core/ToStringTest.java
@@ -21,7 +21,7 @@ package org.libreccm.core;
import org.junit.experimental.categories.Category;
import org.junit.runner.RunWith;
import org.junit.runners.Parameterized;
-import org.libreccm.jpautils.ToStringVerifier;
+import org.libreccm.testutils.ToStringVerifier;
import org.libreccm.tests.categories.UnitTest;
import java.util.Arrays;
diff --git a/ccm-core/src/test/java/org/libreccm/formbuilder/EqualsAndHashCodeTest.java b/ccm-core/src/test/java/org/libreccm/formbuilder/EqualsAndHashCodeTest.java
new file mode 100644
index 000000000..5112c4e83
--- /dev/null
+++ b/ccm-core/src/test/java/org/libreccm/formbuilder/EqualsAndHashCodeTest.java
@@ -0,0 +1,58 @@
+/*
+ * Copyright (C) 2015 LibreCCM Foundation.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301 USA
+ */
+package org.libreccm.formbuilder;
+
+import org.junit.experimental.categories.Category;
+import org.junit.runner.RunWith;
+import org.junit.runners.Parameterized;
+import org.libreccm.testutils.EqualsVerifier;
+import org.libreccm.tests.categories.UnitTest;
+
+import java.util.Arrays;
+import java.util.Collection;
+
+/**
+ *
+ * @author Jens Pelzetter
+ */
+@RunWith(Parameterized.class)
+@Category(UnitTest.class)
+public class EqualsAndHashCodeTest extends EqualsVerifier {
+
+ @Parameterized.Parameters(name = "{0}")
+ public static Collection> data() {
+ return Arrays.asList(new Class>[] {
+ Component.class,
+ DataDrivenSelect.class,
+ FormSection.class,
+ Listener.class,
+ MetaObject.class,
+ ObjectType.class,
+ Option.class,
+ PersistentDataQuery.class,
+ ProcessListener.class,
+ Widget.class,
+ WidgetLabel.class
+ });
+ }
+
+ public EqualsAndHashCodeTest(final Class> entityClass) {
+ super(entityClass);
+ }
+}
diff --git a/ccm-core/src/test/java/org/libreccm/formbuilder/ToStringTest.java b/ccm-core/src/test/java/org/libreccm/formbuilder/ToStringTest.java
new file mode 100644
index 000000000..459db1783
--- /dev/null
+++ b/ccm-core/src/test/java/org/libreccm/formbuilder/ToStringTest.java
@@ -0,0 +1,58 @@
+/*
+ * Copyright (C) 2015 LibreCCM Foundation.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301 USA
+ */
+package org.libreccm.formbuilder;
+
+import org.junit.experimental.categories.Category;
+import org.junit.runner.RunWith;
+import org.junit.runners.Parameterized;
+import org.libreccm.testutils.ToStringVerifier;
+import org.libreccm.tests.categories.UnitTest;
+
+import java.util.Arrays;
+import java.util.Collection;
+
+/**
+ *
+ * @author Jens Pelzetter
+ */
+@RunWith(Parameterized.class)
+@Category(UnitTest.class)
+public class ToStringTest extends ToStringVerifier {
+
+ @Parameterized.Parameters(name = "{0}")
+ public static Collection> data() {
+ return Arrays.asList(new Class>[] {
+ Component.class,
+ DataDrivenSelect.class,
+ FormSection.class,
+ Listener.class,
+ MetaObject.class,
+ ObjectType.class,
+ Option.class,
+ PersistentDataQuery.class,
+ ProcessListener.class,
+ Widget.class,
+ WidgetLabel.class
+ });
+ }
+
+ public ToStringTest(final Class> entityClass) {
+ super(entityClass);
+ }
+}
diff --git a/ccm-core/src/test/java/org/libreccm/formbuilder/actions/EqualsAndHashCodeTest.java b/ccm-core/src/test/java/org/libreccm/formbuilder/actions/EqualsAndHashCodeTest.java
new file mode 100644
index 000000000..13f627c73
--- /dev/null
+++ b/ccm-core/src/test/java/org/libreccm/formbuilder/actions/EqualsAndHashCodeTest.java
@@ -0,0 +1,54 @@
+/*
+ * Copyright (C) 2015 LibreCCM Foundation.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301 USA
+ */
+package org.libreccm.formbuilder.actions;
+
+import org.junit.experimental.categories.Category;
+import org.junit.runner.RunWith;
+import org.junit.runners.Parameterized;
+import org.libreccm.testutils.EqualsVerifier;
+import org.libreccm.tests.categories.UnitTest;
+
+import java.util.Arrays;
+import java.util.Collection;
+
+/**
+ *
+ * @author Jens Pelzetter
+ */
+@RunWith(Parameterized.class)
+@Category(UnitTest.class)
+public class EqualsAndHashCodeTest extends EqualsVerifier {
+
+ @Parameterized.Parameters(name = "{0}")
+ public static Collection> data() {
+ return Arrays.asList(new Class>[]{
+ ConfirmEmailListener.class,
+ ConfirmRedirectListener.class,
+ RemoteServerPostListener.class,
+ SimpleEmailListener.class,
+ TemplateEmailListener.class,
+ XmlEmailListener.class
+ });
+ }
+
+ public EqualsAndHashCodeTest(final Class> entityClass) {
+ super(entityClass);
+ }
+
+}
diff --git a/ccm-core/src/test/java/org/libreccm/formbuilder/actions/ToStringTest.java b/ccm-core/src/test/java/org/libreccm/formbuilder/actions/ToStringTest.java
new file mode 100644
index 000000000..0758a4567
--- /dev/null
+++ b/ccm-core/src/test/java/org/libreccm/formbuilder/actions/ToStringTest.java
@@ -0,0 +1,53 @@
+/*
+ * Copyright (C) 2015 LibreCCM Foundation.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301 USA
+ */
+package org.libreccm.formbuilder.actions;
+
+import org.junit.experimental.categories.Category;
+import org.junit.runner.RunWith;
+import org.junit.runners.Parameterized;
+import org.libreccm.testutils.ToStringVerifier;
+import org.libreccm.tests.categories.UnitTest;
+
+import java.util.Arrays;
+import java.util.Collection;
+
+/**
+ *
+ * @author Jens Pelzetter
+ */
+@RunWith(Parameterized.class)
+@Category(UnitTest.class)
+public class ToStringTest extends ToStringVerifier {
+
+ @Parameterized.Parameters(name = "{0}")
+ public static Collection> data() {
+ return Arrays.asList(new Class>[] {
+ ConfirmEmailListener.class,
+ ConfirmRedirectListener.class,
+ RemoteServerPostListener.class,
+ SimpleEmailListener.class,
+ TemplateEmailListener.class,
+ XmlEmailListener.class
+ });
+ }
+
+ public ToStringTest(final Class> entityClass) {
+ super(entityClass);
+ }
+}
diff --git a/ccm-core/src/test/java/org/libreccm/jpautils/MimeTypeConverterTest.java b/ccm-core/src/test/java/org/libreccm/jpautils/MimeTypeConverterTest.java
new file mode 100644
index 000000000..bc9b50347
--- /dev/null
+++ b/ccm-core/src/test/java/org/libreccm/jpautils/MimeTypeConverterTest.java
@@ -0,0 +1,121 @@
+/*
+ * Copyright (C) 2015 LibreCCM Foundation.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301 USA
+ */
+package org.libreccm.jpautils;
+
+import org.junit.After;
+import org.junit.AfterClass;
+import org.junit.Before;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+import javax.activation.MimeType;
+import javax.activation.MimeTypeParseException;
+
+import static org.junit.Assert.*;
+import static org.hamcrest.Matchers.*;
+
+/**
+ *
+ * @author Jens Pelzetter
+ */
+public class MimeTypeConverterTest {
+
+ public static final String TEXT_PLAIN = "text/plain";
+ public static final String TEXT_XML = "text/xml";
+ public static final String TEXT_HTML = "text/html";
+ public static final String APPLICATION_OCTET_STREAM
+ = "application/octet-stream";
+ public static final String IMAGE_PNG = "image/png";
+ public static final String APPLICATION_PDF = "application/pdf";
+ public static final String DOCX
+ = "application/vnd.openxmlformats-officedocument.wordprocessingml.document";
+ public static final String VIDEO_MP4
+ = "video/mp4";
+
+ private transient MimeTypeConverter mimeTypeConverter;
+
+ public MimeTypeConverterTest() {
+ }
+
+ @BeforeClass
+ public static void setUpClass() {
+ }
+
+ @AfterClass
+ public static void tearDownClass() {
+ }
+
+ @Before
+ public void setUp() {
+ mimeTypeConverter = new MimeTypeConverter();
+ }
+
+ @After
+ public void tearDown() {
+ mimeTypeConverter = null;
+ }
+
+ @Test
+ public void verifyToDatabaseColumn() throws MimeTypeParseException {
+ final MimeType textPlain = new MimeType(TEXT_PLAIN);
+ final MimeType textXml = new MimeType(TEXT_XML);
+ final MimeType textHtml = new MimeType(TEXT_HTML);
+ final MimeType octetStream = new MimeType(APPLICATION_OCTET_STREAM);
+ final MimeType appPdf = new MimeType(APPLICATION_PDF);
+ final MimeType imgPng = new MimeType(IMAGE_PNG);
+ final MimeType docx = new MimeType(DOCX);
+ final MimeType videoMp4 = new MimeType(VIDEO_MP4);
+
+ assertThat(mimeTypeConverter.convertToDatabaseColumn(textPlain),
+ is(equalTo(TEXT_PLAIN)));
+ assertThat(mimeTypeConverter.convertToDatabaseColumn(textXml),
+ is(equalTo(TEXT_XML)));
+ assertThat(mimeTypeConverter.convertToDatabaseColumn(textHtml),
+ is(equalTo(TEXT_HTML)));
+ assertThat(mimeTypeConverter.convertToDatabaseColumn(octetStream),
+ is(equalTo(APPLICATION_OCTET_STREAM)));
+ assertThat(mimeTypeConverter.convertToDatabaseColumn(appPdf),
+ is(equalTo(APPLICATION_PDF)));
+ assertThat(mimeTypeConverter.convertToDatabaseColumn(imgPng),
+ is(equalTo(IMAGE_PNG)));
+ assertThat(mimeTypeConverter.convertToDatabaseColumn(docx),
+ is(equalTo(DOCX)));
+ assertThat(mimeTypeConverter.convertToDatabaseColumn(videoMp4),
+ is(equalTo(VIDEO_MP4)));
+ }
+
+ @Test
+ public void verifyToEntityAttribute() {
+ final MimeType textPlain = mimeTypeConverter.convertToEntityAttribute(
+ TEXT_PLAIN);
+ assertThat(textPlain.toString(), is(equalTo(TEXT_PLAIN)));
+
+ final MimeType docx = mimeTypeConverter.convertToEntityAttribute(DOCX);
+ assertThat(docx.toString(), is(equalTo(DOCX)));
+
+ final MimeType videoMp4 = mimeTypeConverter.convertToEntityAttribute(
+ VIDEO_MP4);
+ assertThat(videoMp4.toString(), is(equalTo(VIDEO_MP4)));
+ }
+
+ @Test(expected = IllegalArgumentException.class)
+ public void invalidMimeTypeInDb() {
+ mimeTypeConverter.convertToEntityAttribute("foo//bar");
+ }
+}
diff --git a/ccm-core/src/test/java/org/libreccm/l10n/EqualsAndHashCodeTest.java b/ccm-core/src/test/java/org/libreccm/l10n/EqualsAndHashCodeTest.java
new file mode 100644
index 000000000..df1535108
--- /dev/null
+++ b/ccm-core/src/test/java/org/libreccm/l10n/EqualsAndHashCodeTest.java
@@ -0,0 +1,49 @@
+/*
+ * Copyright (C) 2015 LibreCCM Foundation.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301 USA
+ */
+package org.libreccm.l10n;
+
+import org.junit.experimental.categories.Category;
+import org.junit.runner.RunWith;
+import org.junit.runners.Parameterized;
+import org.libreccm.tests.categories.UnitTest;
+import org.libreccm.testutils.EqualsVerifier;
+
+import java.util.Arrays;
+import java.util.Collection;
+
+/**
+ *
+ * @author Jens Pelzetter
+ */
+@RunWith(Parameterized.class)
+@Category(UnitTest.class)
+public class EqualsAndHashCodeTest extends EqualsVerifier {
+
+ @Parameterized.Parameters(name = "{0}")
+ public static Collection> data() {
+ return Arrays.asList(new Class>[]{
+ LocalizedString.class
+ });
+ }
+
+ public EqualsAndHashCodeTest(final Class> entityClass) {
+ super(entityClass);
+ }
+
+}
diff --git a/ccm-core/src/test/java/org/libreccm/l10n/ToStringTest.java b/ccm-core/src/test/java/org/libreccm/l10n/ToStringTest.java
new file mode 100644
index 000000000..215d70843
--- /dev/null
+++ b/ccm-core/src/test/java/org/libreccm/l10n/ToStringTest.java
@@ -0,0 +1,49 @@
+/*
+ * Copyright (C) 2015 LibreCCM Foundation.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301 USA
+ */
+package org.libreccm.l10n;
+
+import org.junit.experimental.categories.Category;
+import org.junit.runner.RunWith;
+import org.junit.runners.Parameterized;
+import org.libreccm.tests.categories.UnitTest;
+import org.libreccm.testutils.ToStringVerifier;
+
+import java.util.Arrays;
+import java.util.Collection;
+
+/**
+ *
+ * @author Jens Pelzetter
+ */
+@RunWith(Parameterized.class)
+@Category(UnitTest.class)
+public class ToStringTest extends ToStringVerifier {
+
+ @Parameterized.Parameters(name = "{0}")
+ public static Collection> data() {
+ return Arrays.asList(new Class>[]{
+ LocalizedString.class
+ });
+ }
+
+ public ToStringTest(final Class> entityClass) {
+ super(entityClass);
+ }
+
+}
diff --git a/ccm-core/src/test/java/org/libreccm/messaging/EqualsAndHashCodeTest.java b/ccm-core/src/test/java/org/libreccm/messaging/EqualsAndHashCodeTest.java
new file mode 100644
index 000000000..62d0fff1a
--- /dev/null
+++ b/ccm-core/src/test/java/org/libreccm/messaging/EqualsAndHashCodeTest.java
@@ -0,0 +1,51 @@
+/*
+ * Copyright (C) 2015 LibreCCM Foundation.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301 USA
+ */
+package org.libreccm.messaging;
+
+import org.junit.experimental.categories.Category;
+import org.junit.runner.RunWith;
+import org.junit.runners.Parameterized;
+import org.libreccm.tests.categories.UnitTest;
+import org.libreccm.testutils.EqualsVerifier;
+
+import java.util.Arrays;
+import java.util.Collection;
+
+/**
+ *
+ * @author Jens Pelzetter
+ */
+@RunWith(Parameterized.class)
+@Category(UnitTest.class)
+public class EqualsAndHashCodeTest extends EqualsVerifier {
+
+ @Parameterized.Parameters(name = "{0}")
+ public static Collection> data() {
+ return Arrays.asList(new Class>[]{
+ Attachment.class,
+ Message.class,
+ MessageThread.class
+ });
+ }
+
+ public EqualsAndHashCodeTest(final Class> entityClass) {
+ super(entityClass);
+ }
+
+}
diff --git a/ccm-core/src/test/java/org/libreccm/messaging/ToStringTest.java b/ccm-core/src/test/java/org/libreccm/messaging/ToStringTest.java
new file mode 100644
index 000000000..7fd022cda
--- /dev/null
+++ b/ccm-core/src/test/java/org/libreccm/messaging/ToStringTest.java
@@ -0,0 +1,51 @@
+/*
+ * Copyright (C) 2015 LibreCCM Foundation.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301 USA
+ */
+package org.libreccm.messaging;
+
+import org.junit.experimental.categories.Category;
+import org.junit.runner.RunWith;
+import org.junit.runners.Parameterized;
+import org.libreccm.tests.categories.UnitTest;
+import org.libreccm.testutils.ToStringVerifier;
+
+import java.util.Arrays;
+import java.util.Collection;
+
+/**
+ *
+ * @author Jens Pelzetter
+ */
+@RunWith(Parameterized.class)
+@Category(UnitTest.class)
+public class ToStringTest extends ToStringVerifier {
+
+ @Parameterized.Parameters(name = "{0}")
+ public static Collection> data() {
+ return Arrays.asList(new Class>[]{
+ Attachment.class,
+ Message.class,
+ MessageThread.class
+ });
+ }
+
+ public ToStringTest(final Class> entityClass) {
+ super(entityClass);
+ }
+
+}
diff --git a/ccm-core/src/test/java/org/libreccm/notification/EqualsAndHashCodeTest.java b/ccm-core/src/test/java/org/libreccm/notification/EqualsAndHashCodeTest.java
new file mode 100644
index 000000000..cddb79042
--- /dev/null
+++ b/ccm-core/src/test/java/org/libreccm/notification/EqualsAndHashCodeTest.java
@@ -0,0 +1,51 @@
+/*
+ * Copyright (C) 2015 LibreCCM Foundation.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301 USA
+ */
+package org.libreccm.notification;
+
+import org.junit.experimental.categories.Category;
+import org.junit.runner.RunWith;
+import org.junit.runners.Parameterized;
+import org.libreccm.tests.categories.UnitTest;
+import org.libreccm.testutils.EqualsVerifier;
+
+import java.util.Arrays;
+import java.util.Collection;
+
+/**
+ *
+ * @author Jens Pelzetter
+ */
+@RunWith(Parameterized.class)
+@Category(UnitTest.class)
+public class EqualsAndHashCodeTest extends EqualsVerifier {
+
+ @Parameterized.Parameters(name = "{0}")
+ public static Collection> data() {
+ return Arrays.asList(new Class>[]{
+ Digest.class,
+ Notification.class,
+ QueueItem.class
+ });
+ }
+
+ public EqualsAndHashCodeTest(final Class> entityClass) {
+ super(entityClass);
+ }
+
+}
diff --git a/ccm-core/src/test/java/org/libreccm/notification/ToStringTest.java b/ccm-core/src/test/java/org/libreccm/notification/ToStringTest.java
new file mode 100644
index 000000000..bcf244356
--- /dev/null
+++ b/ccm-core/src/test/java/org/libreccm/notification/ToStringTest.java
@@ -0,0 +1,51 @@
+/*
+ * Copyright (C) 2015 LibreCCM Foundation.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301 USA
+ */
+package org.libreccm.notification;
+
+import org.junit.experimental.categories.Category;
+import org.junit.runner.RunWith;
+import org.junit.runners.Parameterized;
+import org.libreccm.tests.categories.UnitTest;
+import org.libreccm.testutils.ToStringVerifier;
+
+import java.util.Arrays;
+import java.util.Collection;
+
+/**
+ *
+ * @author Jens Pelzetter
+ */
+@RunWith(Parameterized.class)
+@Category(UnitTest.class)
+public class ToStringTest extends ToStringVerifier {
+
+ @Parameterized.Parameters(name = "{0}")
+ public static Collection> data() {
+ return Arrays.asList(new Class>[]{
+ Digest.class,
+ Notification.class,
+ QueueItem.class
+ });
+ }
+
+ public ToStringTest(final Class> entityClass) {
+ super(entityClass);
+ }
+
+}
diff --git a/ccm-core/src/test/java/org/libreccm/portal/EqualsAndHashCodeTest.java b/ccm-core/src/test/java/org/libreccm/portal/EqualsAndHashCodeTest.java
new file mode 100644
index 000000000..007158010
--- /dev/null
+++ b/ccm-core/src/test/java/org/libreccm/portal/EqualsAndHashCodeTest.java
@@ -0,0 +1,49 @@
+/*
+ * Copyright (C) 2015 LibreCCM Foundation.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301 USA
+ */
+package org.libreccm.portal;
+
+import org.junit.experimental.categories.Category;
+import org.junit.runner.RunWith;
+import org.junit.runners.Parameterized;
+import org.libreccm.tests.categories.UnitTest;
+import org.libreccm.testutils.EqualsVerifier;
+
+import java.util.Arrays;
+import java.util.Collection;
+
+/**
+ *
+ * @author Jens Pelzetter
+ */
+@RunWith(Parameterized.class)
+@Category(UnitTest.class)
+public class EqualsAndHashCodeTest extends EqualsVerifier {
+
+ @Parameterized.Parameters(name = "{0}")
+ public static Collection> data() {
+ return Arrays.asList(new Class>[]{
+ Portal.class,
+ Portlet.class
+ });
+ }
+
+ public EqualsAndHashCodeTest(final Class> entityTest) {
+ super(entityTest);
+ }
+}
diff --git a/ccm-core/src/test/java/org/libreccm/portal/ToStringTest.java b/ccm-core/src/test/java/org/libreccm/portal/ToStringTest.java
new file mode 100644
index 000000000..4ad9d9738
--- /dev/null
+++ b/ccm-core/src/test/java/org/libreccm/portal/ToStringTest.java
@@ -0,0 +1,50 @@
+/*
+ * Copyright (C) 2015 LibreCCM Foundation.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301 USA
+ */
+package org.libreccm.portal;
+
+import org.junit.experimental.categories.Category;
+import org.junit.runner.RunWith;
+import org.junit.runners.Parameterized;
+import org.libreccm.tests.categories.UnitTest;
+import org.libreccm.testutils.ToStringVerifier;
+
+import java.util.Arrays;
+import java.util.Collection;
+
+/**
+ *
+ * @author Jens Pelzetter
+ */
+@RunWith(Parameterized.class)
+@Category(UnitTest.class)
+public class ToStringTest extends ToStringVerifier {
+
+ @Parameterized.Parameters(name = "{0}")
+ public static Collection> data() {
+ return Arrays.asList(new Class>[]{
+ Portal.class,
+ Portlet.class
+ });
+ }
+
+ public ToStringTest(final Class> entityClass) {
+ super(entityClass);
+ }
+
+}
diff --git a/ccm-core/src/test/java/org/libreccm/runtime/EqualsAndHashCodeTest.java b/ccm-core/src/test/java/org/libreccm/runtime/EqualsAndHashCodeTest.java
new file mode 100644
index 000000000..c8cd247c1
--- /dev/null
+++ b/ccm-core/src/test/java/org/libreccm/runtime/EqualsAndHashCodeTest.java
@@ -0,0 +1,50 @@
+/*
+ * Copyright (C) 2015 LibreCCM Foundation.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301 USA
+ */
+package org.libreccm.runtime;
+
+import org.junit.experimental.categories.Category;
+import org.junit.runner.RunWith;
+import org.junit.runners.Parameterized;
+import org.libreccm.tests.categories.UnitTest;
+import org.libreccm.testutils.EqualsVerifier;
+
+import java.util.Arrays;
+import java.util.Collection;
+
+/**
+ *
+ * @author Jens Pelzetter
+ */
+@RunWith(Parameterized.class)
+@Category(UnitTest.class)
+public class EqualsAndHashCodeTest extends EqualsVerifier {
+
+ @Parameterized.Parameters(name = "{0}")
+ public static Collection> data() {
+ return Arrays.asList(new Class>[]{
+ Initalizer.class
+ });
+ }
+
+ public EqualsAndHashCodeTest(final Class> entityClass) {
+ super(entityClass);
+ }
+
+
+}
diff --git a/ccm-core/src/test/java/org/libreccm/runtime/ToStringTest.java b/ccm-core/src/test/java/org/libreccm/runtime/ToStringTest.java
new file mode 100644
index 000000000..c3c192835
--- /dev/null
+++ b/ccm-core/src/test/java/org/libreccm/runtime/ToStringTest.java
@@ -0,0 +1,49 @@
+/*
+ * Copyright (C) 2015 LibreCCM Foundation.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301 USA
+ */
+package org.libreccm.runtime;
+
+import org.junit.experimental.categories.Category;
+import org.junit.runner.RunWith;
+import org.junit.runners.Parameterized;
+import org.libreccm.tests.categories.UnitTest;
+import org.libreccm.testutils.ToStringVerifier;
+
+import java.util.Arrays;
+import java.util.Collection;
+
+/**
+ *
+ * @author Jens Pelzetter
+ */
+@RunWith(Parameterized.class)
+@Category(UnitTest.class)
+public class ToStringTest extends ToStringVerifier {
+
+ @Parameterized.Parameters(name = "{0}")
+ public static Collection> data() {
+ return Arrays.asList(new Class>[]{
+ Initalizer.class
+ });
+ }
+
+ public ToStringTest(final Class> entityClass) {
+ super(entityClass);
+ }
+
+}
diff --git a/ccm-core/src/test/java/org/libreccm/search/lucene/EqualsAndHashCodeTest.java b/ccm-core/src/test/java/org/libreccm/search/lucene/EqualsAndHashCodeTest.java
new file mode 100644
index 000000000..35b1fbdb5
--- /dev/null
+++ b/ccm-core/src/test/java/org/libreccm/search/lucene/EqualsAndHashCodeTest.java
@@ -0,0 +1,50 @@
+/*
+ * Copyright (C) 2015 LibreCCM Foundation.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301 USA
+ */
+package org.libreccm.search.lucene;
+
+import org.junit.experimental.categories.Category;
+import org.junit.runner.RunWith;
+import org.junit.runners.Parameterized;
+import org.libreccm.tests.categories.UnitTest;
+import org.libreccm.testutils.EqualsVerifier;
+
+import java.util.Arrays;
+import java.util.Collection;
+
+/**
+ *
+ * @author Jens Pelzetter
+ */
+@RunWith(Parameterized.class)
+@Category(UnitTest.class)
+public class EqualsAndHashCodeTest extends EqualsVerifier {
+
+ @Parameterized.Parameters(name = "{0}")
+ public static Collection> data() {
+ return Arrays.asList(new Class>[]{
+ Document.class,
+ Index.class
+ });
+ }
+
+ public EqualsAndHashCodeTest(final Class> entityClass) {
+ super(entityClass);
+ }
+
+}
diff --git a/ccm-core/src/test/java/org/libreccm/search/lucene/ToStringTest.java b/ccm-core/src/test/java/org/libreccm/search/lucene/ToStringTest.java
new file mode 100644
index 000000000..2ca7077b8
--- /dev/null
+++ b/ccm-core/src/test/java/org/libreccm/search/lucene/ToStringTest.java
@@ -0,0 +1,50 @@
+/*
+ * Copyright (C) 2015 LibreCCM Foundation.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301 USA
+ */
+package org.libreccm.search.lucene;
+
+import org.junit.experimental.categories.Category;
+import org.junit.runner.RunWith;
+import org.junit.runners.Parameterized;
+import org.libreccm.tests.categories.UnitTest;
+import org.libreccm.testutils.ToStringVerifier;
+
+import java.util.Arrays;
+import java.util.Collection;
+
+/**
+ *
+ * @author Jens Pelzetter
+ */
+@RunWith(Parameterized.class)
+@Category(UnitTest.class)
+public class ToStringTest extends ToStringVerifier {
+
+ @Parameterized.Parameters(name = "{0}")
+ public static Collection> data() {
+ return Arrays.asList(new Class>[]{
+ Document.class,
+ Index.class
+ });
+ }
+
+ public ToStringTest(final Class> entityClass) {
+ super(entityClass);
+ }
+
+}
diff --git a/ccm-core/src/test/java/org/libreccm/jpautils/EqualsVerifier.java b/ccm-core/src/test/java/org/libreccm/testutils/EqualsVerifier.java
similarity index 98%
rename from ccm-core/src/test/java/org/libreccm/jpautils/EqualsVerifier.java
rename to ccm-core/src/test/java/org/libreccm/testutils/EqualsVerifier.java
index 0ee7f6d98..1820fc656 100644
--- a/ccm-core/src/test/java/org/libreccm/jpautils/EqualsVerifier.java
+++ b/ccm-core/src/test/java/org/libreccm/testutils/EqualsVerifier.java
@@ -16,7 +16,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
* MA 02110-1301 USA
*/
-package org.libreccm.jpautils;
+package org.libreccm.testutils;
import nl.jqno.equalsverifier.Warning;
import org.junit.Test;
diff --git a/ccm-core/src/test/java/org/libreccm/jpautils/ToStringVerifier.java b/ccm-core/src/test/java/org/libreccm/testutils/ToStringVerifier.java
similarity index 99%
rename from ccm-core/src/test/java/org/libreccm/jpautils/ToStringVerifier.java
rename to ccm-core/src/test/java/org/libreccm/testutils/ToStringVerifier.java
index 938926253..8812de2a7 100644
--- a/ccm-core/src/test/java/org/libreccm/jpautils/ToStringVerifier.java
+++ b/ccm-core/src/test/java/org/libreccm/testutils/ToStringVerifier.java
@@ -16,7 +16,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
* MA 02110-1301 USA
*/
-package org.libreccm.jpautils;
+package org.libreccm.testutils;
import org.junit.Assert;
import org.junit.Test;
diff --git a/ccm-core/src/test/java/org/libreccm/web/EqualsAndHashCodeTest.java b/ccm-core/src/test/java/org/libreccm/web/EqualsAndHashCodeTest.java
new file mode 100644
index 000000000..3cbe26a60
--- /dev/null
+++ b/ccm-core/src/test/java/org/libreccm/web/EqualsAndHashCodeTest.java
@@ -0,0 +1,50 @@
+/*
+ * Copyright (C) 2015 LibreCCM Foundation.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301 USA
+ */
+package org.libreccm.web;
+
+import org.junit.experimental.categories.Category;
+import org.junit.runner.RunWith;
+import org.junit.runners.Parameterized;
+import org.libreccm.tests.categories.UnitTest;
+import org.libreccm.testutils.EqualsVerifier;
+
+import java.util.Arrays;
+import java.util.Collection;
+
+/**
+ *
+ * @author Jens Pelzetter
+ */
+@RunWith(Parameterized.class)
+@Category(UnitTest.class)
+public class EqualsAndHashCodeTest extends EqualsVerifier {
+
+ @Parameterized.Parameters(name = "{0}")
+ public static Collection> data() {
+ return Arrays.asList(new Class>[]{
+ Application.class,
+ Host.class
+ });
+ }
+
+ public EqualsAndHashCodeTest(final Class> entityClass) {
+ super(entityClass);
+ }
+
+}
diff --git a/ccm-core/src/test/java/org/libreccm/web/ToStringTest.java b/ccm-core/src/test/java/org/libreccm/web/ToStringTest.java
new file mode 100644
index 000000000..d028d188e
--- /dev/null
+++ b/ccm-core/src/test/java/org/libreccm/web/ToStringTest.java
@@ -0,0 +1,50 @@
+/*
+ * Copyright (C) 2015 LibreCCM Foundation.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301 USA
+ */
+package org.libreccm.web;
+
+import org.junit.experimental.categories.Category;
+import org.junit.runner.RunWith;
+import org.junit.runners.Parameterized;
+import org.libreccm.tests.categories.UnitTest;
+import org.libreccm.testutils.ToStringVerifier;
+
+import java.util.Arrays;
+import java.util.Collection;
+
+/**
+ *
+ * @author Jens Pelzetter
+ */
+@RunWith(Parameterized.class)
+@Category(UnitTest.class)
+public class ToStringTest extends ToStringVerifier {
+
+ @Parameterized.Parameters(name = "{0}")
+ public static Collection> data() {
+ return Arrays.asList(new Class>[]{
+ Application.class,
+ Host.class
+ });
+ }
+
+ public ToStringTest(final Class> entityClass) {
+ super(entityClass);
+ }
+
+}
diff --git a/ccm-core/src/test/java/org/libreccm/workflow/EqualsAndHashCodeTest.java b/ccm-core/src/test/java/org/libreccm/workflow/EqualsAndHashCodeTest.java
new file mode 100644
index 000000000..fd1e6f0bf
--- /dev/null
+++ b/ccm-core/src/test/java/org/libreccm/workflow/EqualsAndHashCodeTest.java
@@ -0,0 +1,51 @@
+/*
+ * Copyright (C) 2015 LibreCCM Foundation.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301 USA
+ */
+package org.libreccm.workflow;
+
+import org.junit.experimental.categories.Category;
+import org.junit.runner.RunWith;
+import org.junit.runners.Parameterized;
+import org.libreccm.tests.categories.UnitTest;
+import org.libreccm.testutils.EqualsVerifier;
+
+import java.util.Arrays;
+import java.util.Collection;
+
+/**
+ *
+ * @author Jens Pelzetter
+ */
+@RunWith(Parameterized.class)
+@Category(UnitTest.class)
+public class EqualsAndHashCodeTest extends EqualsVerifier {
+
+ @Parameterized.Parameters(name = "{0}")
+ public static Collection> data() {
+ return Arrays.asList(new Class>[]{
+ Task.class,
+ UserTask.class,
+ Workflow.class
+ });
+ }
+
+ public EqualsAndHashCodeTest(final Class> entityClass) {
+ super(entityClass);
+ }
+
+}
diff --git a/ccm-core/src/test/java/org/libreccm/workflow/ToStringTest.java b/ccm-core/src/test/java/org/libreccm/workflow/ToStringTest.java
new file mode 100644
index 000000000..ea3f7665d
--- /dev/null
+++ b/ccm-core/src/test/java/org/libreccm/workflow/ToStringTest.java
@@ -0,0 +1,51 @@
+/*
+ * Copyright (C) 2015 LibreCCM Foundation.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301 USA
+ */
+package org.libreccm.workflow;
+
+import org.junit.experimental.categories.Category;
+import org.junit.runner.RunWith;
+import org.junit.runners.Parameterized;
+import org.libreccm.tests.categories.UnitTest;
+import org.libreccm.testutils.ToStringVerifier;
+
+import java.util.Arrays;
+import java.util.Collection;
+
+/**
+ *
+ * @author Jens Pelzetter
+ */
+@RunWith(Parameterized.class)
+@Category(UnitTest.class)
+public class ToStringTest extends ToStringVerifier {
+
+ @Parameterized.Parameters(name = "{0}")
+ public static Collection> data() {
+ return Arrays.asList(new Class>[]{
+ Task.class,
+ UserTask.class,
+ Workflow.class
+ });
+ }
+
+ public ToStringTest(final Class> entityClass) {
+ super(entityClass);
+ }
+
+}