diff --git a/src/test/java/io/lettuce/core/RedisCommandBuilderUnitTests.java b/src/test/java/io/lettuce/core/RedisCommandBuilderUnitTests.java index f99393cc18..16276b1703 100644 --- a/src/test/java/io/lettuce/core/RedisCommandBuilderUnitTests.java +++ b/src/test/java/io/lettuce/core/RedisCommandBuilderUnitTests.java @@ -7,6 +7,8 @@ import org.junit.jupiter.api.Test; import java.nio.charset.StandardCharsets; +import java.util.List; +import java.util.Map; import static org.assertj.core.api.Assertions.assertThat; @@ -168,4 +170,14 @@ void shouldCorrectlyConstructClusterMyshardid() { .isEqualTo("*2\r\n" + "$7\r\n" + "CLUSTER\r\n" + "$9\r\n" + "MYSHARDID\r\n"); } + @Test + void shouldCorrectlyConstructClusterLinks() { + + Command>> command = sut.clusterLinks(); + ByteBuf buf = Unpooled.directBuffer(); + command.encode(buf); + + assertThat(buf.toString(StandardCharsets.UTF_8)).isEqualTo("*2\r\n$7\r\nCLUSTER\r\n$5\r\nLINKS\r\n"); + } + }