use of org.apache.rocketmq.connect.redis.parser.HSetNxParser in project rocketmq-externals by apache.
the class ParserTest method testHSetNxParser.
@Test
public void testHSetNxParser() {
String command = "hsetnx key field value";
KVEntry builder = new HSetNxParser().parse(parseCommand(command));
Assert.assertEquals("hsetnx", 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