use of org.apache.rocketmq.connect.redis.parser.HmSetParser in project rocketmq-externals by apache.
the class ParserTest method testHmSetParser.
@Test
public void testHmSetParser() {
String command = "hmset key f1 v1 f2 v2";
KVEntry builder = new HmSetParser().parse(parseCommand(command));
Assert.assertEquals("hmset", builder.getCommand());
Assert.assertEquals("key", builder.getKey());
Map<String, String> res = (Map<String, String>) builder.getValue();
Assert.assertEquals(2, res.size());
Assert.assertEquals("v1", res.get("f1"));
Assert.assertEquals("v2", res.get("f2"));
}
Aggregations