use of org.apache.rocketmq.connect.redis.parser.HSetParser in project rocketmq-externals by apache.
the class ParserTest method testHSetParser.
@Test
public void testHSetParser() {
String command = "hset key field value";
KVEntry builder = new HSetParser().parse(parseCommand(command));
Assert.assertEquals("hset", builder.getCommand());
Assert.assertEquals("key", builder.getKey());
Map<String, String> res = (Map<String, String>) builder.getValue();
Assert.assertEquals(1, res.size());
Assert.assertEquals("value", res.get("field"));
}
Aggregations