@Test public void shouldAddDataBufferBody() { DataBufferFactory dataBufferFactory = new DefaultDataBufferFactory(); DataBuffer originalBuffer = dataBufferFactory.wrap("test".getBytes()); Buffer expectedBuffer = Buffer.buffer("test".getBytes()); new SnowdropAmqpMessageBuilder(mockDelegate).withBufferAsBody(originalBuffer); verify(mockDelegate).withBufferAsBody(expectedBuffer); }
@Override public AmqpMessageBuilder withBufferAsBody(DataBuffer value) { delegate.withBufferAsBody(Buffer.buffer(value.asByteBuffer().array())); return this; }
SnowdropAmqpMessageBuilder implements AmqpMessageBuilder { @Override public AmqpMessageBuilder withBufferAsBody(DataBuffer value) { delegate.withBufferAsBody(Buffer.buffer(value.asByteBuffer().array())); return this; } }
SnowdropAmqpMessageBuilder implements AmqpMessageBuilder { @Override public AmqpMessageBuilder withBufferAsBody(DataBuffer value) { delegate.withBufferAsBody(Buffer.buffer(value.asByteBuffer().array())); return this; } SnowdropAmqpMessageBuilder(io.vertx.amqp.AmqpMessageBuilder delegate);   SnowdropAmqpMessageBuilder(); }
SnowdropAmqpMessageBuilder implements AmqpMessageBuilder { @Override public AmqpMessageBuilder withBufferAsBody(DataBuffer value) { delegate.withBufferAsBody(Buffer.buffer(value.asByteBuffer().array())); return this; } SnowdropAmqpMessageBuilder(io.vertx.amqp.AmqpMessageBuilder delegate);   SnowdropAmqpMessageBuilder(); @Override AmqpMessage build(); @Override AmqpMessageBuilder priority(short priority); @Override AmqpMessageBuilder durable(boolean durable); @Override AmqpMessageBuilder ttl(long ttl); @Override AmqpMessageBuilder firstAcquirer(boolean firstAcquirer); @Override AmqpMessageBuilder deliveryCount(int deliveryCount); @Override AmqpMessageBuilder id(String id); @Override AmqpMessageBuilder address(String address); @Override AmqpMessageBuilder replyTo(String replyTo); @Override AmqpMessageBuilder correlationId(String correlationId); @Override AmqpMessageBuilder withBody(String value); @Override AmqpMessageBuilder withSymbolAsBody(String value); @Override AmqpMessageBuilder subject(String subject); @Override AmqpMessageBuilder contentType(String contentType); @Override AmqpMessageBuilder contentEncoding(String contentEncoding); @Override AmqpMessageBuilder expiryTime(long expiryTime); @Override AmqpMessageBuilder creationTime(long creationTime); @Override AmqpMessageBuilder groupId(String groupId); @Override AmqpMessageBuilder replyToGroupId(String replyToGroupId); @Override AmqpMessageBuilder applicationProperties(Map<String, Object> applicationProperties); @Override AmqpMessageBuilder withBooleanAsBody(boolean value); @Override AmqpMessageBuilder withByteAsBody(byte value); @Override AmqpMessageBuilder withShortAsBody(short value); @Override AmqpMessageBuilder withIntegerAsBody(int value); @Override AmqpMessageBuilder withLongAsBody(long value); @Override AmqpMessageBuilder withFloatAsBody(float value); @Override AmqpMessageBuilder withDoubleAsBody(double value); @Override AmqpMessageBuilder withCharAsBody(char value); @Override AmqpMessageBuilder withInstantAsBody(Instant value); @Override AmqpMessageBuilder withUuidAsBody(UUID value); @Override AmqpMessageBuilder withListAsBody(List list); @Override AmqpMessageBuilder withMapAsBody(Map map); @Override AmqpMessageBuilder withBufferAsBody(DataBuffer value); @Override AmqpMessageBuilder withJsonObjectAsBody(JsonObject jsonObject); @Override AmqpMessageBuilder withJsonArrayAsBody(JsonArray jsonArray); }
SnowdropAmqpMessageBuilder implements AmqpMessageBuilder { @Override public AmqpMessageBuilder withBufferAsBody(DataBuffer value) { delegate.withBufferAsBody(Buffer.buffer(value.asByteBuffer().array())); return this; } SnowdropAmqpMessageBuilder(io.vertx.amqp.AmqpMessageBuilder delegate);   SnowdropAmqpMessageBuilder(); @Override AmqpMessage build(); @Override AmqpMessageBuilder priority(short priority); @Override AmqpMessageBuilder durable(boolean durable); @Override AmqpMessageBuilder ttl(long ttl); @Override AmqpMessageBuilder firstAcquirer(boolean firstAcquirer); @Override AmqpMessageBuilder deliveryCount(int deliveryCount); @Override AmqpMessageBuilder id(String id); @Override AmqpMessageBuilder address(String address); @Override AmqpMessageBuilder replyTo(String replyTo); @Override AmqpMessageBuilder correlationId(String correlationId); @Override AmqpMessageBuilder withBody(String value); @Override AmqpMessageBuilder withSymbolAsBody(String value); @Override AmqpMessageBuilder subject(String subject); @Override AmqpMessageBuilder contentType(String contentType); @Override AmqpMessageBuilder contentEncoding(String contentEncoding); @Override AmqpMessageBuilder expiryTime(long expiryTime); @Override AmqpMessageBuilder creationTime(long creationTime); @Override AmqpMessageBuilder groupId(String groupId); @Override AmqpMessageBuilder replyToGroupId(String replyToGroupId); @Override AmqpMessageBuilder applicationProperties(Map<String, Object> applicationProperties); @Override AmqpMessageBuilder withBooleanAsBody(boolean value); @Override AmqpMessageBuilder withByteAsBody(byte value); @Override AmqpMessageBuilder withShortAsBody(short value); @Override AmqpMessageBuilder withIntegerAsBody(int value); @Override AmqpMessageBuilder withLongAsBody(long value); @Override AmqpMessageBuilder withFloatAsBody(float value); @Override AmqpMessageBuilder withDoubleAsBody(double value); @Override AmqpMessageBuilder withCharAsBody(char value); @Override AmqpMessageBuilder withInstantAsBody(Instant value); @Override AmqpMessageBuilder withUuidAsBody(UUID value); @Override AmqpMessageBuilder withListAsBody(List list); @Override AmqpMessageBuilder withMapAsBody(Map map); @Override AmqpMessageBuilder withBufferAsBody(DataBuffer value); @Override AmqpMessageBuilder withJsonObjectAsBody(JsonObject jsonObject); @Override AmqpMessageBuilder withJsonArrayAsBody(JsonArray jsonArray);  }