@Test(expected = BucketStatsException.class) public void testShouldFailOnReplyError() throws BucketStatsException { GetBucketListReply reply = new GetBucketListReply(); reply.addError(new Error(0, "errormsg")); when(mockedSession.syncSend(any())).thenReturn(reply); createRetriever().retrieveBucketList(new BucketId(1), bucketSpace); }
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(); }
BucketStatsRetriever { 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(); } }
BucketStatsRetriever { 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(); } BucketStatsRetriever(
            DocumentAccessFactory documentAccessFactory,
            String route,
            ShutdownHookRegistrar registrar); }
BucketStatsRetriever { 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(); } BucketStatsRetriever(
            DocumentAccessFactory documentAccessFactory,
            String route,
            ShutdownHookRegistrar registrar); BucketId getBucketIdForType(ClientParameters.SelectionType type, String id); String retrieveBucketStats(ClientParameters.SelectionType type, String id, BucketId bucketId, String bucketSpace); List<GetBucketListReply.BucketInfo> retrieveBucketList(BucketId bucketId, String bucketSpace); }
BucketStatsRetriever { 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(); } BucketStatsRetriever(
            DocumentAccessFactory documentAccessFactory,
            String route,
            ShutdownHookRegistrar registrar); BucketId getBucketIdForType(ClientParameters.SelectionType type, String id); String retrieveBucketStats(ClientParameters.SelectionType type, String id, BucketId bucketId, String bucketSpace); List<GetBucketListReply.BucketInfo> retrieveBucketList(BucketId bucketId, String bucketSpace);  }