diff --git a/rm-server/test/java/org/alfresco/module/org_alfresco_module_rm/test/integration/IntegrationTestSuite.java b/rm-server/test/java/org/alfresco/module/org_alfresco_module_rm/test/integration/IntegrationTestSuite.java
index ada86601c6..69a7cbd8ae 100755
--- a/rm-server/test/java/org/alfresco/module/org_alfresco_module_rm/test/integration/IntegrationTestSuite.java
+++ b/rm-server/test/java/org/alfresco/module/org_alfresco_module_rm/test/integration/IntegrationTestSuite.java
@@ -18,6 +18,7 @@
*/
package org.alfresco.module.org_alfresco_module_rm.test.integration;
+import org.alfresco.module.org_alfresco_module_rm.test.integration.classification.ClassificationTestSuite;
import org.alfresco.module.org_alfresco_module_rm.test.integration.disposition.DispositionTestSuite;
import org.alfresco.module.org_alfresco_module_rm.test.integration.dod.DoD5015TestSuite;
import org.alfresco.module.org_alfresco_module_rm.test.integration.event.EventTestSuite;
@@ -55,7 +56,8 @@ import org.junit.runners.Suite.SuiteClasses;
HoldTestSuite.class,
VersionTestSuite.class,
RelationshipTestSuite.class,
- TransferTestSuite.class
+ TransferTestSuite.class,
+ ClassificationTestSuite.class
})
public class IntegrationTestSuite
{
diff --git a/rm-server/test/java/org/alfresco/module/org_alfresco_module_rm/test/integration/classification/ClassificationReasonsTest.java b/rm-server/test/java/org/alfresco/module/org_alfresco_module_rm/test/integration/classification/ClassificationReasonsTest.java
new file mode 100644
index 0000000000..7f71d76c60
--- /dev/null
+++ b/rm-server/test/java/org/alfresco/module/org_alfresco_module_rm/test/integration/classification/ClassificationReasonsTest.java
@@ -0,0 +1,64 @@
+/*
+ * Copyright (C) 2005-2015 Alfresco Software Limited.
+ *
+ * This file is part of Alfresco
+ *
+ * Alfresco 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 3 of the License, or
+ * (at your option) any later version.
+ *
+ * Alfresco 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 Alfresco. If not, see .
+ */
+
+package org.alfresco.module.org_alfresco_module_rm.test.integration.classification;
+
+import java.util.List;
+
+import org.alfresco.module.org_alfresco_module_rm.classification.ClassificationReason;
+import org.alfresco.module.org_alfresco_module_rm.test.util.BaseRMTestCase;
+
+/**
+ * Tests of classification reason handling.
+ *
+ * @author tpage
+ * @since 3.0
+ */
+public class ClassificationReasonsTest extends BaseRMTestCase
+{
+ /**
+ * Given the default classification reasons config file is on the classpath
+ * When the system has finished starting up
+ * Then the classification service exposes the classification reasons.
+ */
+ public void testLoadBootstrappedClassificationReasons() throws Exception
+ {
+ doBehaviourDrivenTest(new BehaviourDrivenTest()
+ {
+ public void given() throws Exception
+ {
+ // NOOP: The default classification reasons config file is on the classpath.
+ }
+
+ public void when() throws Exception
+ {
+ // NOOP: The system has finished starting up.
+ }
+
+ public void then() throws Exception
+ {
+ // Check the classification service exposes the classification reasons.
+ List reasons = classificationService.getClassificationReasons();
+ assertNotNull(reasons);
+ assertEquals("The default classification reasons in rm-classification-levels.json contains three reasons.",
+ 3, reasons.size());
+ }
+ });
+ }
+}
diff --git a/rm-server/test/java/org/alfresco/module/org_alfresco_module_rm/test/integration/classification/ClassificationTestSuite.java b/rm-server/test/java/org/alfresco/module/org_alfresco_module_rm/test/integration/classification/ClassificationTestSuite.java
new file mode 100644
index 0000000000..c16d2bc844
--- /dev/null
+++ b/rm-server/test/java/org/alfresco/module/org_alfresco_module_rm/test/integration/classification/ClassificationTestSuite.java
@@ -0,0 +1,38 @@
+/*
+ * Copyright (C) 2005-2014 Alfresco Software Limited.
+ *
+ * This file is part of Alfresco
+ *
+ * Alfresco 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 3 of the License, or
+ * (at your option) any later version.
+ *
+ * Alfresco 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 Alfresco. If not, see .
+ */
+package org.alfresco.module.org_alfresco_module_rm.test.integration.classification;
+
+import org.junit.runner.RunWith;
+import org.junit.runners.Suite;
+import org.junit.runners.Suite.SuiteClasses;
+
+/**
+ * Record integration test suite
+ *
+ * @author tpage
+ * @since 3.0
+ */
+@RunWith(Suite.class)
+@SuiteClasses(
+{
+ ClassificationReasonsTest.class
+})
+public class ClassificationTestSuite
+{
+}
diff --git a/rm-server/test/java/org/alfresco/module/org_alfresco_module_rm/test/util/BaseRMTestCase.java b/rm-server/test/java/org/alfresco/module/org_alfresco_module_rm/test/util/BaseRMTestCase.java
index ab2da29b56..c304645469 100644
--- a/rm-server/test/java/org/alfresco/module/org_alfresco_module_rm/test/util/BaseRMTestCase.java
+++ b/rm-server/test/java/org/alfresco/module/org_alfresco_module_rm/test/util/BaseRMTestCase.java
@@ -29,6 +29,7 @@ import org.alfresco.module.org_alfresco_module_rm.admin.RecordsManagementAdminSe
import org.alfresco.module.org_alfresco_module_rm.audit.RecordsManagementAuditService;
import org.alfresco.module.org_alfresco_module_rm.capability.CapabilityService;
import org.alfresco.module.org_alfresco_module_rm.capability.RMPermissionModel;
+import org.alfresco.module.org_alfresco_module_rm.classification.ClassificationService;
import org.alfresco.module.org_alfresco_module_rm.dataset.DataSetService;
import org.alfresco.module.org_alfresco_module_rm.disposition.DispositionSchedule;
import org.alfresco.module.org_alfresco_module_rm.disposition.DispositionService;
@@ -160,6 +161,7 @@ public abstract class BaseRMTestCase extends RetryingTransactionHelperTestCase
protected HoldService holdService;
protected InplaceRecordService inplaceRecordService;
protected RelationshipService relationshipService;
+ protected ClassificationService classificationService;
/** test data */
protected String siteId;
@@ -399,6 +401,7 @@ public abstract class BaseRMTestCase extends RetryingTransactionHelperTestCase
holdService = (HoldService) applicationContext.getBean("HoldService");
inplaceRecordService = (InplaceRecordService) applicationContext.getBean("InplaceRecordService");
relationshipService = (RelationshipService) applicationContext.getBean("RelationshipService");
+ classificationService = (ClassificationService) applicationContext.getBean("ClassificationService");
}
/**