use of org.apache.rocketmq.connect.redis.parser.MSetNxParser in project rocketmq-externals by apache.
the class ParserTest method testMSetNxParser.
@Test
public void testMSetNxParser() {
String command = "msetnx k1 v1 k2 v2";
KVEntry builder = new MSetNxParser().parse(parseCommand(command));
Assert.assertEquals("msetnx", builder.getCommand());
Assert.assertEquals("k1", builder.getKey());
Map<String, String> res = (Map<String, String>) builder.getValue();
Assert.assertEquals("v1", res.get("k1"));
Assert.assertEquals("v2", res.get("k2"));
}
Aggregations