@Test
public void testGetEnvelopes() throws Exception
{

    when( messageDao.getTargetPeers() ).thenReturn( Lists.newArrayList( TARGET_PEER_ID ) );
    when( messageDao.getMessages( eq( TARGET_PEER_ID ), anyInt(), anyInt() ) )
            .thenReturn( Lists.newArrayList( messageEntity ) );
    Set<Envelope> envelopeSet = messengerDataService.getEnvelopes();
    assertFalse( envelopeSet.isEmpty() );
}