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