return count;
}
private ServerMessage createTestServerMessage(String conflationKeyValue)
{
ServerMessage mockMessage = mock(ServerMessage.class);
AMQMessageHeader messageHeader = mock(AMQMessageHeader.class);
when(messageHeader.getHeader(CONFLATION_KEY)).thenReturn(conflationKeyValue);
when(mockMessage.getMessageHeader()).thenReturn(messageHeader);
MessageReference messageReference = mock(MessageReference.class);
when(mockMessage.newReference()).thenReturn(messageReference);
when(messageReference.getMessage()).thenReturn(mockMessage);
return mockMessage;
}