.decode(((Map<String, CachedData>) command.getResult())
.get("test2")));
}
public void testGetsManyDecode() {
TextGetCommand command = (TextGetCommand) this.commandFactory
.createGetMultiCommand(keys, new CountDownLatch(1),
CommandType.GETS_MANY, transcoder);
checkDecodeNullAndNotLineByteBuffer(command);
checkDecodeInvalidLine(command,"test1", "STORED\r\n");
checkDecodeInvalidLine(command,"test1", "NOT_FOUND\r\n");
checkDecodeInvalidLine(command,"test1", "NOT_STORED\r\n");
checkDecodeInvalidLine(command, "test1","DELETED\r\n");
checkDecodeValidLine(command, "END\r\n");
assertEquals(0, ((Map) command.getResult()).size());
command.setParseStatus(net.rubyeye.xmemcached.command.text.TextGetCommand.ParseStatus.NULL);
// data not complelte
assertFalse(command.decode(null, ByteBuffer
.wrap("VALUE test1 0 2 999\r\n10\r\nVALUE test2 0 4 1000\r\n10"
.getBytes())));
// data coming,but not with END
assertFalse(command.decode(null, ByteBuffer.wrap("00\r\n".getBytes())));
checkDecodeValidLine(command, "END\r\n");
assertEquals(2, ((Map) command.getResult()).size());
assertEquals(999, ((Map<String, CachedData>) command.getResult()).get(
"test1").getCas());
assertEquals(1000, ((Map<String, CachedData>) command.getResult()).get(
"test2").getCas());
assertEquals("10", transcoder.decode(((Map<String, CachedData>) command
.getResult()).get("test1")));
assertEquals("1000", transcoder
.decode(((Map<String, CachedData>) command.getResult())
.get("test2")));
}