Repository: eclipse/leshan
Pull request #705 (2019-06-24 13:40:55)

Move redis store implementation from leshan-server-cluster to a new leshan-server-redis project
See #679 for more details.


Patch:
diff --git a/leshan-server-cluster/pom.xml b/leshan-server-cluster/pom.xml
index 6e3de297..7e5df8d8 100644
--- a/leshan-server-cluster/pom.xml
+++ b/leshan-server-cluster/pom.xml
@@ -37,6 +37,10 @@ Contributors:
             <groupId>org.eclipse.leshan</groupId>
             <artifactId>leshan-server-cf</artifactId>
         </dependency>
+        <dependency>
+            <groupId>org.eclipse.leshan</groupId>
+            <artifactId>leshan-server-redis</artifactId>
+        </dependency>
         <dependency>
             <groupId>redis.clients</groupId>
             <artifactId>jedis</artifactId>
diff --git a/leshan-server-cluster/src/main/java/org/eclipse/leshan/server/cluster/LeshanClusterServer.java b/leshan-server-cluster/src/main/java/org/eclipse/leshan/server/cluster/LeshanClusterServer.java
index b115c7fc..b934ba0e 100644
--- a/leshan-server-cluster/src/main/java/org/eclipse/leshan/server/cluster/LeshanClusterServer.java
+++ b/leshan-server-cluster/src/main/java/org/eclipse/leshan/server/cluster/LeshanClusterServer.java
@@ -33,6 +33,8 @@ import org.eclipse.leshan.server.californium.LeshanServerBuilder;
 import org.eclipse.leshan.server.californium.impl.LeshanServer;
 import org.eclipse.leshan.server.model.LwM2mModelProvider;
 import org.eclipse.leshan.server.model.StaticModelProvider;
+import org.eclipse.leshan.server.redis.RedisRegistrationStore;
+import org.eclipse.leshan.server.redis.RedisSecurityStore;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
diff --git a/leshan-server-cluster/src/main/java/org/eclipse/leshan/server/cluster/RedisRegistrationEventPublisher.java b/leshan-server-cluster/src/main/java/org/eclipse/leshan/server/cluster/RedisRegistrationEventPublisher.java
index 40e1da68..ba55657b 100644
--- a/leshan-server-cluster/src/main/java/org/eclipse/leshan/server/cluster/RedisRegistrationEventPublisher.java
+++ b/leshan-server-cluster/src/main/java/org/eclipse/leshan/server/cluster/RedisRegistrationEventPublisher.java
@@ -18,8 +18,8 @@ package org.eclipse.leshan.server.cluster;
 import java.util.Collection;
 
 import org.eclipse.leshan.core.observation.Observation;
-import org.eclipse.leshan.server.cluster.serialization.RegistrationSerDes;
 import org.eclipse.leshan.server.cluster.serialization.RegistrationUpdateSerDes;
+import org.eclipse.leshan.server.redis.serialization.RegistrationSerDes;
 import org.eclipse.leshan.server.registration.Registration;
 import org.eclipse.leshan.server.registration.RegistrationListener;
 import org.eclipse.leshan.server.registration.RegistrationUpdate;
diff --git a/leshan-server-cluster/src/main/java/org/eclipse/leshan/server/cluster/serialization/RegistrationUpdateSerDes.java b/leshan-server-cluster/src/main/java/org/eclipse/leshan/server/cluster/serialization/RegistrationUpdateSerDes.java
index 5e6a5f60..e246099c 100644
--- a/leshan-server-cluster/src/main/java/org/eclipse/leshan/server/cluster/serialization/RegistrationUpdateSerDes.java
+++ b/leshan-server-cluster/src/main/java/org/eclipse/leshan/server/cluster/serialization/RegistrationUpdateSerDes.java
@@ -22,6 +22,7 @@ import java.util.Map;
 import org.eclipse.leshan.Link;
 import org.eclipse.leshan.core.request.BindingMode;
 import org.eclipse.leshan.core.request.Identity;
+import org.eclipse.leshan.server.redis.serialization.IdentitySerDes;
 import org.eclipse.leshan.server.registration.RegistrationUpdate;
 
 import com.eclipsesource.json.Json;
diff --git a/leshan-server-demo/pom.xml b/leshan-server-demo/pom.xml
index 8a830760..72a37039 100644
--- a/leshan-server-demo/pom.xml
+++ b/leshan-server-demo/pom.xml
@@ -38,7 +38,7 @@ Contributors:
         </dependency>
         <dependency>
             <groupId>org.eclipse.leshan</groupId>
-            <artifactId>leshan-server-cluster</artifactId>
+            <artifactId>leshan-server-redis</artifactId>
         </dependency>
         <dependency>
             <groupId>commons-cli</groupId>
diff --git a/leshan-server-demo/src/main/java/org/eclipse/leshan/server/demo/LeshanServerDemo.java b/leshan-server-demo/src/main/java/org/eclipse/leshan/server/demo/LeshanServerDemo.java
index 38907680..ebc4be56 100644
--- a/leshan-server-demo/src/main/java/org/eclipse/leshan/server/demo/LeshanServerDemo.java
+++ b/leshan-server-demo/src/main/java/org/eclipse/leshan/server/demo/LeshanServerDemo.java
@@ -60,8 +60,6 @@ import org.eclipse.leshan.core.node.codec.DefaultLwM2mNodeEncoder;
 import org.eclipse.leshan.core.node.codec.LwM2mNodeDecoder;
 import org.eclipse.leshan.server.californium.LeshanServerBuilder;
 import org.eclipse.leshan.server.californium.impl.LeshanServer;
-import org.eclipse.leshan.server.cluster.RedisRegistrationStore;
-import org.eclipse.leshan.server.cluster.RedisSecurityStore;
 import org.eclipse.leshan.server.demo.servlet.ClientServlet;
 import org.eclipse.leshan.server.demo.servlet.EventServlet;
 import org.eclipse.leshan.server.demo.servlet.ObjectSpecServlet;
@@ -70,6 +68,8 @@ import org.eclipse.leshan.server.demo.utils.MagicLwM2mValueConverter;
 import org.eclipse.leshan.server.impl.FileSecurityStore;
 import org.eclipse.leshan.server.model.LwM2mModelProvider;
 import org.eclipse.leshan.server.model.StaticModelProvider;
+import org.eclipse.leshan.server.redis.RedisRegistrationStore;
+import org.eclipse.leshan.server.redis.RedisSecurityStore;
 import org.eclipse.leshan.server.security.EditableSecurityStore;
 import org.eclipse.leshan.util.SecurityUtil;
 import org.slf4j.Logger;
diff --git a/leshan-server-redis/pom.xml b/leshan-server-redis/pom.xml
new file mode 100644
index 00000000..dc265661
--- /dev/null
+++ b/leshan-server-redis/pom.xml
@@ -0,0 +1,70 @@
+<!--
+
+Copyright (c) 2013-2016 Sierra Wireless and others.
+
+All rights reserved. This program and the accompanying materials
+are made available under the terms of the Eclipse Public License v1.0
+and Eclipse Distribution License v1.0 which accompany this distribution.
+
+The Eclipse Public License is available at
+   http://www.eclipse.org/legal/epl-v10.html
+and the Eclipse Distribution License is available at
+   http://www.eclipse.org/org/documents/edl-v10.html.
+
+Contributors:
+    Sierra Wireless - initial API and implementation
+    Bosch Software Innovations GmbH - OSGi support
+
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+    <parent>
+        <groupId>org.eclipse.leshan</groupId>
+        <artifactId>leshan</artifactId>
+        <version>1.0.0-SNAPSHOT</version>
+    </parent>
+    <artifactId>leshan-server-redis</artifactId>
+    <packaging>bundle</packaging>
+    <name>leshan - server redis</name>
+    <description>Redis implementation for different stores of Leshan Server</description>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.eclipse.leshan</groupId>
+            <artifactId>leshan-server-cf</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>redis.clients</groupId>
+            <artifactId>jedis</artifactId>
+            <version>2.8.0</version>
+        </dependency>
+        <dependency>
+            <groupId>com.eclipsesource.minimal-json</groupId>
+            <artifactId>minimal-json</artifactId>
+        </dependency>
+
+        <!-- test dependencies -->
+        <dependency>
+            <groupId>junit</groupId>
+            <artifactId>junit</artifactId>
+            <scope>test</scope>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.felix</groupId>
+                <artifactId>maven-bundle-plugin</artifactId>
+                <extensions>true</extensions>
+                <configuration>
+                    <instructions>
+                        <_exportcontents>*</_exportcontents>
+                        <Import-Package>*</Import-Package>
+                        <Bundle-SymbolicName>${project.artifactId}</Bundle-SymbolicName>
+                    </instructions>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
+</project>
diff --git a/leshan-server-cluster/src/main/java/org/eclipse/leshan/server/cluster/RedisLock.java b/leshan-server-redis/src/main/java/org/eclipse/leshan/server/redis/RedisLock.java
similarity index 98%
rename from leshan-server-cluster/src/main/java/org/eclipse/leshan/server/cluster/RedisLock.java
rename to leshan-server-redis/src/main/java/org/eclipse/leshan/server/redis/RedisLock.java
index 3f7e64b3..3addace0 100644
--- a/leshan-server-cluster/src/main/java/org/eclipse/leshan/server/cluster/RedisLock.java
+++ b/leshan-server-redis/src/main/java/org/eclipse/leshan/server/redis/RedisLock.java
@@ -13,7 +13,7 @@
  * Contributors:
  *     Sierra Wireless - initial API and implementation
  *******************************************************************************/
-package org.eclipse.leshan.server.cluster;
+package org.eclipse.leshan.server.redis;
 
 import static java.nio.charset.StandardCharsets.UTF_8;
 
diff --git a/leshan-server-cluster/src/main/java/org/eclipse/leshan/server/cluster/RedisRegistrationStore.java b/leshan-server-redis/src/main/java/org/eclipse/leshan/server/redis/RedisRegistrationStore.java
similarity index 99%
rename from leshan-server-cluster/src/main/java/org/eclipse/leshan/server/cluster/RedisRegistrationStore.java
rename to leshan-server-redis/src/main/java/org/eclipse/leshan/server/redis/RedisRegistrationStore.java
index 77aaa8bc..54a6f41c 100644
--- a/leshan-server-cluster/src/main/java/org/eclipse/leshan/server/cluster/RedisRegistrationStore.java
+++ b/leshan-server-redis/src/main/java/org/eclipse/leshan/server/redis/RedisRegistrationStore.java
@@ -17,7 +17,7 @@
  *     Achim Kraus (Bosch Software Innovations GmbH) - update to modified 
  *                                                     ObservationStore API
  *******************************************************************************/
-package org.eclipse.leshan.server.cluster;
+package org.eclipse.leshan.server.redis;
 
 import static java.nio.charset.StandardCharsets.UTF_8;
 
@@ -41,8 +41,8 @@ import org.eclipse.leshan.server.Startable;
 import org.eclipse.leshan.server.Stoppable;
 import org.eclipse.leshan.server.californium.CaliforniumRegistrationStore;
 import org.eclipse.leshan.server.californium.ObserveUtil;
-import org.eclipse.leshan.server.cluster.serialization.ObservationSerDes;
-import org.eclipse.leshan.server.cluster.serialization.RegistrationSerDes;
+import org.eclipse.leshan.server.redis.serialization.ObservationSerDes;
+import org.eclipse.leshan.server.redis.serialization.RegistrationSerDes;
 import org.eclipse.leshan.server.registration.Deregistration;
 import org.eclipse.leshan.server.registration.ExpirationListener;
 import org.eclipse.leshan.server.registration.Registration;
diff --git a/leshan-server-cluster/src/main/java/org/eclipse/leshan/server/cluster/RedisSecurityStore.java b/leshan-server-redis/src/main/java/org/eclipse/leshan/server/redis/RedisSecurityStore.java
similarity index 97%
rename from leshan-server-cluster/src/main/java/org/eclipse/leshan/server/cluster/RedisSecurityStore.java
rename to leshan-server-redis/src/main/java/org/eclipse/leshan/server/redis/RedisSecurityStore.java
index e3aa1c3e..7bd74818 100644
--- a/leshan-server-cluster/src/main/java/org/eclipse/leshan/server/cluster/RedisSecurityStore.java
+++ b/leshan-server-redis/src/main/java/org/eclipse/leshan/server/redis/RedisSecurityStore.java
@@ -13,12 +13,12 @@
  * Contributors:
  *     Sierra Wireless - initial API and implementation
  *******************************************************************************/
-package org.eclipse.leshan.server.cluster;
+package org.eclipse.leshan.server.redis;
 
 import java.util.Collection;
 import java.util.LinkedList;
 
-import org.eclipse.leshan.server.cluster.serialization.SecurityInfoSerDes;
+import org.eclipse.leshan.server.redis.serialization.SecurityInfoSerDes;
 import org.eclipse.leshan.server.security.EditableSecurityStore;
 import org.eclipse.leshan.server.security.NonUniqueSecurityInfoException;
 import org.eclipse.leshan.server.security.SecurityInfo;
diff --git a/leshan-server-cluster/src/main/java/org/eclipse/leshan/server/cluster/serialization/EndpointContextSerDes.java b/leshan-server-redis/src/main/java/org/eclipse/leshan/server/redis/serialization/EndpointContextSerDes.java
similarity index 98%
rename from leshan-server-cluster/src/main/java/org/eclipse/leshan/server/cluster/serialization/EndpointContextSerDes.java
rename to leshan-server-redis/src/main/java/org/eclipse/leshan/server/redis/serialization/EndpointContextSerDes.java
index cbf3fcd6..4be1430c 100644
--- a/leshan-server-cluster/src/main/java/org/eclipse/leshan/server/cluster/serialization/EndpointContextSerDes.java
+++ b/leshan-server-redis/src/main/java/org/eclipse/leshan/server/redis/serialization/EndpointContextSerDes.java
@@ -13,7 +13,7 @@
  * Contributors:
  *    Achim Kraus (Bosch Software Innovations GmbH) - initial implementation.
  ******************************************************************************/
-package org.eclipse.leshan.server.cluster.serialization;
+package org.eclipse.leshan.server.redis.serialization;
 
 import java.net.InetSocketAddress;
 import java.security.KeyFactory;
diff --git a/leshan-server-cluster/src/main/java/org/eclipse/leshan/server/cluster/serialization/IdentitySerDes.java b/leshan-server-redis/src/main/java/org/eclipse/leshan/server/redis/serialization/IdentitySerDes.java
similarity index 98%
rename from leshan-server-cluster/src/main/java/org/eclipse/leshan/server/cluster/serialization/IdentitySerDes.java
rename to leshan-server-redis/src/main/java/org/eclipse/leshan/server/redis/serialization/IdentitySerDes.java
index cdb33d3a..1050dba6 100644
--- a/leshan-server-cluster/src/main/java/org/eclipse/leshan/server/cluster/serialization/IdentitySerDes.java
+++ b/leshan-server-redis/src/main/java/org/eclipse/leshan/server/redis/serialization/IdentitySerDes.java
@@ -13,7 +13,7 @@
  * Contributors:
  *    Achim Kraus (Bosch Software Innovations GmbH) - initial implementation.
  ******************************************************************************/
-package org.eclipse.leshan.server.cluster.serialization;
+package org.eclipse.leshan.server.redis.serialization;
 
 import java.net.InetSocketAddress;
 import java.security.KeyFactory;
diff --git a/leshan-server-cluster/src/main/java/org/eclipse/leshan/server/cluster/serialization/ObservationSerDes.java b/leshan-server-redis/src/main/java/org/eclipse/leshan/server/redis/serialization/ObservationSerDes.java
similarity index 98%
rename from leshan-server-cluster/src/main/java/org/eclipse/leshan/server/cluster/serialization/ObservationSerDes.java
rename to leshan-server-redis/src/main/java/org/eclipse/leshan/server/redis/serialization/ObservationSerDes.java
index 76d31fde..6ad0f6b4 100644
--- a/leshan-server-cluster/src/main/java/org/eclipse/leshan/server/cluster/serialization/ObservationSerDes.java
+++ b/leshan-server-redis/src/main/java/org/eclipse/leshan/server/redis/serialization/ObservationSerDes.java
@@ -15,7 +15,7 @@
  *     Achim Kraus (Bosch Software Innovations GmbH) - add support for californium
  *                                                     endpoint context
  *******************************************************************************/
-package org.eclipse.leshan.server.cluster.serialization;
+package org.eclipse.leshan.server.redis.serialization;
 
 import java.util.HashMap;
 import java.util.Map;
diff --git a/leshan-server-cluster/src/main/java/org/eclipse/leshan/server/cluster/serialization/RegistrationSerDes.java b/leshan-server-redis/src/main/java/org/eclipse/leshan/server/redis/serialization/RegistrationSerDes.java
similarity index 98%
rename from leshan-server-cluster/src/main/java/org/eclipse/leshan/server/cluster/serialization/RegistrationSerDes.java
rename to leshan-server-redis/src/main/java/org/eclipse/leshan/server/redis/serialization/RegistrationSerDes.java
index c3a3f7cd..7eb467ae 100644
--- a/leshan-server-cluster/src/main/java/org/eclipse/leshan/server/cluster/serialization/RegistrationSerDes.java
+++ b/leshan-server-redis/src/main/java/org/eclipse/leshan/server/redis/serialization/RegistrationSerDes.java
@@ -13,7 +13,7 @@
  * Contributors:
  *     Sierra Wireless - initial API and implementation
  *******************************************************************************/
-package org.eclipse.leshan.server.cluster.serialization;
+package org.eclipse.leshan.server.redis.serialization;
 
 import java.net.InetSocketAddress;
 import java.util.Date;
diff --git a/leshan-server-cluster/src/main/java/org/eclipse/leshan/server/cluster/serialization/SecurityInfoSerDes.java b/leshan-server-redis/src/main/java/org/eclipse/leshan/server/redis/serialization/SecurityInfoSerDes.java
similarity index 98%
rename from leshan-server-cluster/src/main/java/org/eclipse/leshan/server/cluster/serialization/SecurityInfoSerDes.java
rename to leshan-server-redis/src/main/java/org/eclipse/leshan/server/redis/serialization/SecurityInfoSerDes.java
index 2b2b8e58..34dbe077 100644
--- a/leshan-server-cluster/src/main/java/org/eclipse/leshan/server/cluster/serialization/SecurityInfoSerDes.java
+++ b/leshan-server-redis/src/main/java/org/eclipse/leshan/server/redis/serialization/SecurityInfoSerDes.java
@@ -13,7 +13,7 @@
  * Contributors:
  *     Sierra Wireless - initial API and implementation
  *******************************************************************************/
-package org.eclipse.leshan.server.cluster.serialization;
+package org.eclipse.leshan.server.redis.serialization;
 
 import java.math.BigInteger;
 import java.security.AlgorithmParameters;
diff --git a/pom.xml b/pom.xml
index a4dab1ad..4387e938 100644
--- a/pom.xml
+++ b/pom.xml
@@ -44,6 +44,7 @@ Contributors:
         <module>leshan-core-cf</module>
         <module>leshan-server-core</module>
         <module>leshan-server-cf</module>
+        <module>leshan-server-redis</module>
         <module>leshan-server-cluster</module>
         <module>leshan-client-core</module>
         <module>leshan-client-cf</module>
@@ -403,6 +404,11 @@ Contributors:
                 <artifactId>leshan-client-cf</artifactId>
                 <version>${project.version}</version>
             </dependency>
+            <dependency>
+                <groupId>${project.groupId}</groupId>
+                <artifactId>leshan-server-redis</artifactId>
+                <version>${project.version}</version>
+            </dependency>
             <dependency>
                 <groupId>${project.groupId}</groupId>
                 <artifactId>leshan-server-cluster</artifactId>


Test patch:
diff --git a/leshan-integration-tests/pom.xml b/leshan-integration-tests/pom.xml
index bd29e760..b444dab5 100644
--- a/leshan-integration-tests/pom.xml
+++ b/leshan-integration-tests/pom.xml
@@ -33,7 +33,7 @@ Contributors:
         </dependency>
         <dependency>
             <groupId>org.eclipse.leshan</groupId>
-            <artifactId>leshan-server-cluster</artifactId>
+            <artifactId>leshan-server-redis</artifactId>
         </dependency>
         <dependency>
             <groupId>org.eclipse.leshan</groupId>
diff --git a/leshan-integration-tests/src/test/java/org/eclipse/leshan/integration/tests/RedisIntegrationTestHelper.java b/leshan-integration-tests/src/test/java/org/eclipse/leshan/integration/tests/RedisIntegrationTestHelper.java
index b4323bad..9048dbbb 100644
--- a/leshan-integration-tests/src/test/java/org/eclipse/leshan/integration/tests/RedisIntegrationTestHelper.java
+++ b/leshan-integration-tests/src/test/java/org/eclipse/leshan/integration/tests/RedisIntegrationTestHelper.java
@@ -20,9 +20,9 @@ import java.net.InetSocketAddress;
 
 import org.eclipse.leshan.core.node.codec.DefaultLwM2mNodeDecoder;
 import org.eclipse.leshan.server.californium.LeshanServerBuilder;
-import org.eclipse.leshan.server.cluster.RedisRegistrationStore;
 import org.eclipse.leshan.server.impl.InMemorySecurityStore;
 import org.eclipse.leshan.server.model.StaticModelProvider;
+import org.eclipse.leshan.server.redis.RedisRegistrationStore;
 
 import redis.clients.jedis.Jedis;
 import redis.clients.jedis.JedisPool;
diff --git a/leshan-integration-tests/src/test/java/org/eclipse/leshan/integration/tests/RedisSecureIntegrationTestHelper.java b/leshan-integration-tests/src/test/java/org/eclipse/leshan/integration/tests/RedisSecureIntegrationTestHelper.java
index fed8b95b..d01cd6d5 100644
--- a/leshan-integration-tests/src/test/java/org/eclipse/leshan/integration/tests/RedisSecureIntegrationTestHelper.java
+++ b/leshan-integration-tests/src/test/java/org/eclipse/leshan/integration/tests/RedisSecureIntegrationTestHelper.java
@@ -16,8 +16,8 @@
 package org.eclipse.leshan.integration.tests;
 
 import org.eclipse.leshan.server.californium.LeshanServerBuilder;
-import org.eclipse.leshan.server.cluster.RedisRegistrationStore;
-import org.eclipse.leshan.server.cluster.RedisSecurityStore;
+import org.eclipse.leshan.server.redis.RedisRegistrationStore;
+import org.eclipse.leshan.server.redis.RedisSecurityStore;
 
 import redis.clients.jedis.Jedis;
 import redis.clients.jedis.JedisPool;
diff --git a/leshan-server-cluster/src/test/java/org/eclipse/leshan/server/cluster/serialization/RegistrationSerDesTest.java b/leshan-server-redis/src/test/java/org/eclipse/leshan/server/redis/serialization/RegistrationSerDesTest.java
similarity index 93%
rename from leshan-server-cluster/src/test/java/org/eclipse/leshan/server/cluster/serialization/RegistrationSerDesTest.java
rename to leshan-server-redis/src/test/java/org/eclipse/leshan/server/redis/serialization/RegistrationSerDesTest.java
index 6a7981f1..b80b0a3d 100644
--- a/leshan-server-cluster/src/test/java/org/eclipse/leshan/server/cluster/serialization/RegistrationSerDesTest.java
+++ b/leshan-server-redis/src/test/java/org/eclipse/leshan/server/redis/serialization/RegistrationSerDesTest.java
@@ -13,7 +13,7 @@
  * Contributors:
  *     Sierra Wireless - initial API and implementation
  *******************************************************************************/
-package org.eclipse.leshan.server.cluster.serialization;
+package org.eclipse.leshan.server.redis.serialization;
 
 import static org.junit.Assert.assertEquals;
 
@@ -25,6 +25,7 @@ import java.util.Map;
 
 import org.eclipse.leshan.Link;
 import org.eclipse.leshan.core.request.Identity;
+import org.eclipse.leshan.server.redis.serialization.RegistrationSerDes;
 import org.eclipse.leshan.server.registration.Registration;
 import org.junit.Test;
 
diff --git a/leshan-server-cluster/src/test/java/org/eclipse/leshan/server/cluster/serialization/SecurityInfoSerDesTest.java b/leshan-server-redis/src/test/java/org/eclipse/leshan/server/redis/serialization/SecurityInfoSerDesTest.java
similarity index 95%
rename from leshan-server-cluster/src/test/java/org/eclipse/leshan/server/cluster/serialization/SecurityInfoSerDesTest.java
rename to leshan-server-redis/src/test/java/org/eclipse/leshan/server/redis/serialization/SecurityInfoSerDesTest.java
index 8c6f5381..a10a6bc9 100644
--- a/leshan-server-cluster/src/test/java/org/eclipse/leshan/server/cluster/serialization/SecurityInfoSerDesTest.java
+++ b/leshan-server-redis/src/test/java/org/eclipse/leshan/server/redis/serialization/SecurityInfoSerDesTest.java
@@ -13,7 +13,7 @@
  * Contributors:
  *     Sierra Wireless - initial API and implementation
  *******************************************************************************/
-package org.eclipse.leshan.server.cluster.serialization;
+package org.eclipse.leshan.server.redis.serialization;
 
 import static org.junit.Assert.assertEquals;
 
@@ -26,7 +26,7 @@ import java.security.spec.ECPoint;
 import java.security.spec.ECPublicKeySpec;
 import java.security.spec.KeySpec;
 
-import org.eclipse.leshan.server.cluster.serialization.SecurityInfoSerDes;
+import org.eclipse.leshan.server.redis.serialization.SecurityInfoSerDes;
 import org.eclipse.leshan.server.security.SecurityInfo;
 import org.eclipse.leshan.util.Hex;
 import org.junit.Test;