diff --git a/pom.xml b/pom.xml
index dde6c99..6a0ea62 100644
--- a/pom.xml
+++ b/pom.xml
@@ -169,6 +169,13 @@
-->
+
+ org.gcube.information-system
+ resource-registry-api
+ [1.0.0-SNAPSHOT, 2.0.0-SNAPSHOT)
+ test
+
+
org.gcube.core
diff --git a/src/test/java/org/gcube/informationsystem/sweeper/ISSweeperPluginSmartExecutorSchedulerTest.java b/src/test/java/org/gcube/informationsystem/sweeper/ISSweeperPluginSmartExecutorSchedulerTest.java
index 7dcf711..85d7800 100644
--- a/src/test/java/org/gcube/informationsystem/sweeper/ISSweeperPluginSmartExecutorSchedulerTest.java
+++ b/src/test/java/org/gcube/informationsystem/sweeper/ISSweeperPluginSmartExecutorSchedulerTest.java
@@ -58,7 +58,7 @@ public class ISSweeperPluginSmartExecutorSchedulerTest extends ScopedTest {
@Test
public void cronExpPreviousMustBeTerminated() throws Exception {
CronExpression cronExpression = new CronExpression("0 */10 * * * ?"); // every 10 minutes starting from now
- Scheduling scheduling = new Scheduling(cronExpression, true);
+ Scheduling scheduling = new Scheduling(cronExpression);
scheduling.setGlobal(true);
UUID uuid = scheduleTest(scheduling);
diff --git a/src/test/java/org/gcube/test/TempTest.java b/src/test/java/org/gcube/test/TempTest.java
index 4e6f693..5a5e741 100644
--- a/src/test/java/org/gcube/test/TempTest.java
+++ b/src/test/java/org/gcube/test/TempTest.java
@@ -3,6 +3,7 @@
*/
package org.gcube.test;
+import java.io.IOException;
import java.io.StringWriter;
import java.util.LinkedList;
import java.util.List;
@@ -15,6 +16,9 @@ import org.gcube.common.scope.api.ScopeProvider;
import org.gcube.informationsystem.publisher.RegistryPublisherFactory;
import org.gcube.informationsystem.publisher.ScopedPublisher;
import org.gcube.informationsystem.publisher.exception.RegistryNotFoundException;
+import org.gcube.informationsystem.resourceregistry.api.exceptions.ExceptionMapper;
+import org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException;
+import org.gcube.informationsystem.resourceregistry.api.exceptions.entity.EntityAlreadyPresentException;
import org.gcube.testutility.ScopedTest;
import org.junit.Test;
import org.slf4j.Logger;
@@ -80,19 +84,33 @@ public class TempTest extends ScopedTest {
}
}
+ @Test
+ public void exceptionSerilizationTest() throws IOException{
+ //ResourceRegistryException rre = new ResourceRegistryException("Test");
+
+ ResourceRegistryException rre = new EntityAlreadyPresentException("Aux");
+
+ String jsonString = ExceptionMapper.marshal(rre);
+
+ logger.debug(jsonString);
+
+ rre = ExceptionMapper.unmarshal(ResourceRegistryException.class, jsonString);
+
+ logger.debug("Unmarshalled exception is ", rre);
+ }
public static final String SERVICE_ENDPOINT_CATEGORY = "Database";
public static final String SERVICE_ENDPOINT_NAME = "TwitterMonitorDatabase";
public static final String ENTRY_NAME = "postgress";
+
@Test
- public void testTWMonitorDiscovery() throws Exception {
- ScopedTest.setContext(GCUBE_DEVSEC);
-
+ public void testTwitterMonitorDatabaseDiscovery() throws Exception{
DatabaseDiscovery databaseDiscovery = new DatabaseDiscovery(SERVICE_ENDPOINT_CATEGORY, SERVICE_ENDPOINT_NAME, ENTRY_NAME);
- logger.debug("Username : {}", databaseDiscovery.getUsername());
- logger.debug("Password : {}", databaseDiscovery.getPassword());
- logger.debug("URL : {}", databaseDiscovery.getURL());
-
+ logger.info("{}", databaseDiscovery.getUsername());
+ logger.info("{}", databaseDiscovery.getPassword());
+ logger.info("{}", databaseDiscovery.getURL());
}
+
+
}