Search in sources :

Example 1 with TestMessageMetaData

use of org.apache.qpid.server.store.TestMessageMetaData in project qpid-broker-j by apache.

the class SynchronousMessageStoreRecovererTest method createMockStoredMessage.

private StoredMessage<StorableMessageMetaData> createMockStoredMessage(final long messageId) {
    TestMessageMetaData metaData = new TestMessageMetaData(messageId, 0);
    @SuppressWarnings("unchecked") final StoredMessage<StorableMessageMetaData> storedMessage = mock(StoredMessage.class);
    when(storedMessage.getMessageNumber()).thenReturn(messageId);
    when(storedMessage.getMetaData()).thenReturn(metaData);
    return storedMessage;
}
Also used : TestMessageMetaData(org.apache.qpid.server.store.TestMessageMetaData) StorableMessageMetaData(org.apache.qpid.server.store.StorableMessageMetaData)

Example 2 with TestMessageMetaData

use of org.apache.qpid.server.store.TestMessageMetaData in project qpid-broker-j by apache.

the class AsynchronousMessageStoreRecovererTest method createTestMessage.

private StoredMessage<?> createTestMessage(final long messageNumber) {
    final StorableMessageMetaData metaData = new TestMessageMetaData(messageNumber, 0);
    final StoredMessage storedMessage = mock(StoredMessage.class);
    when(storedMessage.getMessageNumber()).thenReturn(messageNumber);
    when(storedMessage.getMetaData()).thenReturn(metaData);
    return storedMessage;
}
Also used : StoredMessage(org.apache.qpid.server.store.StoredMessage) TestMessageMetaData(org.apache.qpid.server.store.TestMessageMetaData) StorableMessageMetaData(org.apache.qpid.server.store.StorableMessageMetaData)

Aggregations

StorableMessageMetaData (org.apache.qpid.server.store.StorableMessageMetaData)2 TestMessageMetaData (org.apache.qpid.server.store.TestMessageMetaData)2 StoredMessage (org.apache.qpid.server.store.StoredMessage)1