assertEquals(message, ((ChannelBuffer)receive.data()).toString(Charsets.US_ASCII));
}
{
os = ChannelBuffers.dynamicBuffer();
long integer = 999;
new IntegerReply(integer).write(os);
receive = redisDecoder.receive(os);
assertTrue(receive instanceof IntegerReply);
assertEquals(integer, receive.data());
}
{
os = ChannelBuffers.dynamicBuffer();
String message = "OK";
long integer = 999;
new MultiBulkReply(new Reply[] {
new StatusReply(message),
new ErrorReply(message),
new MultiBulkReply(new Reply[] { new StatusReply(message)}),
new BulkReply(ChannelBuffers.wrappedBuffer(message.getBytes())),
new IntegerReply(integer)}).write(os);
receive = redisDecoder.receive(os);
assertTrue(receive instanceof MultiBulkReply);
Reply[] data = (Reply[]) receive.data();
assertEquals(message, data[0].data());
assertEquals(message, data[1].data());