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