use of org.apache.qpid.server.protocol.v1_0.type.UnsignedLong in project qpid-broker-j by apache.
the class PropertyConverter_v1_0_to_InternalTest method testCorrelationIdUnsignedLongConversion.
public void testCorrelationIdUnsignedLongConversion() {
final UnsignedLong correlationId = UnsignedLong.valueOf(-1L);
Properties properties = new Properties();
properties.setCorrelationId(correlationId);
Message_1_0 originalMessage = createTestMessage(properties);
InternalMessage convertedMessage = _messageConverter.convert(originalMessage, _addressSpace);
assertEquals("Unexpected correlationId", correlationId.toString(), convertedMessage.getMessageHeader().getCorrelationId());
}
use of org.apache.qpid.server.protocol.v1_0.type.UnsignedLong in project qpid-broker-j by apache.
the class PropertyConverter_1_0_to_0_10Test method testCorrelationIdULongConversion.
public void testCorrelationIdULongConversion() {
final UnsignedLong correlationId = UnsignedLong.valueOf(-1);
Properties properties = new Properties();
properties.setCorrelationId(correlationId);
Message_1_0 message = createTestMessage(properties);
final MessageTransferMessage convertedMessage = _messageConverter.convert(message, _namedAddressSpace);
final MessageProperties messageProperties = convertedMessage.getStoredMessage().getMetaData().getMessageProperties();
assertTrue("Unexpected correlationId", Arrays.equals(longToBytes(correlationId.longValue()), messageProperties.getCorrelationId()));
}
use of org.apache.qpid.server.protocol.v1_0.type.UnsignedLong in project qpid-broker-j by apache.
the class PropertyConverter_1_0_to_0_8Test method testCorrelationIdULongConversion.
public void testCorrelationIdULongConversion() {
final UnsignedLong correlationId = UnsignedLong.valueOf(-1);
Properties properties = new Properties();
properties.setCorrelationId(correlationId);
Message_1_0 message = createTestMessage(properties);
final AMQMessage convertedMessage = _messageConverter.convert(message, _namedAddressSpace);
BasicContentHeaderProperties convertedProperties = convertedMessage.getContentHeaderBody().getProperties();
assertEquals("Unexpected correlationId", correlationId.toString(), convertedProperties.getCorrelationId().toString());
}
use of org.apache.qpid.server.protocol.v1_0.type.UnsignedLong in project qpid-broker-j by apache.
the class PropertyConverter_1_0_to_0_8Test method testMessageIdUnsignedLongConversion.
public void testMessageIdUnsignedLongConversion() {
final UnsignedLong messageId = UnsignedLong.valueOf(-1);
Properties properties = new Properties();
properties.setMessageId(messageId);
Message_1_0 message = createTestMessage(properties);
final AMQMessage convertedMessage = _messageConverter.convert(message, _namedAddressSpace);
BasicContentHeaderProperties convertedProperties = convertedMessage.getContentHeaderBody().getProperties();
assertEquals("Unexpected messageId", messageId.toString(), convertedProperties.getMessageId().toString());
}
use of org.apache.qpid.server.protocol.v1_0.type.UnsignedLong in project qpid-broker-j by apache.
the class PropertyConverter_Internal_to_v1_0Test method testCorrelationIdUnsignedLongConversion.
public void testCorrelationIdUnsignedLongConversion() {
final UnsignedLong correlationId = UnsignedLong.valueOf(-1L);
final AMQMessageHeader header = mock(AMQMessageHeader.class);
when(header.getCorrelationId()).thenReturn(correlationId.toString());
InternalMessage originalMessage = createTestMessage(header);
Message_1_0 convertedMessage = _messageConverter.convert(originalMessage, _addressSpace);
Object convertedCorrelationId = MessageConverter_from_1_0.getCorrelationId(convertedMessage);
assertEquals("Unexpected correlationId", correlationId, convertedCorrelationId);
}
Aggregations