use of org.apache.rocketmq.connect.redis.parser.PfMergeParser in project rocketmq-externals by apache.
the class ParserTest method testPfMergeParser.
@Test
public void testPfMergeParser() {
String command = "PFMERGE destkey sourcekey1 sourcekey2";
KVEntry builder = new PfMergeParser().parse(parseCommand(command));
Assert.assertEquals("PFMERGE", builder.getCommand());
Assert.assertEquals("destkey", builder.getKey());
List<String> res = (List<String>) builder.getValue();
Assert.assertEquals(2, res.size());
Assert.assertEquals("sourcekey1", res.get(0));
Assert.assertEquals("sourcekey2", res.get(1));
}
Aggregations