public List<GetBucketListReply.BucketInfo> retrieveBucketList(BucketId bucketId, String bucketSpace) throws BucketStatsException {
        GetBucketListMessage msg = new GetBucketListMessage(bucketId, bucketSpace);
        GetBucketListReply bucketListReply = sendMessage(msg, GetBucketListReply.class);
        return bucketListReply.getBuckets();
    }
@Test
    void testRetrieveBucketList() throws BucketStatsException {
        String bucketInfo = "I like turtles!";
        BucketId bucketId = bucketIdFactory.getBucketId(new DocumentId("id:ns:type::another"));

        GetBucketListReply reply = new GetBucketListReply();
        reply.getBuckets().add(new GetBucketListReply.BucketInfo(bucketId, bucketInfo));
        when(mockedSession.syncSend(any())).thenReturn(reply);

        List<GetBucketListReply.BucketInfo> bucketList = createRetriever().retrieveBucketList(bucketId, bucketSpace);

        verify(mockedSession, times(1)).syncSend(any());
        assertEquals(1, bucketList.size());
        assertEquals(bucketInfo, bucketList.get(0).getBucketInformation());
    }