Set up riak for unittest in Java
fenglinlfl at gmail.com
Tue Jul 29 20:35:07 EDT 2014
Is there an easy way to set up riak for unittest purpose?
I have some java service that talks to Riak, and I want to write unittest
for that flow to make sure the Riak client is properly triggered.
I tried Mockito to mock Riak client out, but then I realized that I need to
mock out the fetchBucket and execute() as well otherwise I will get
NullPointerException left and right.
My code snippet is very basic as following (with riakClient being mockito
Bucket bucket = riakClient.fetchBucket("some_key").execute();
return bucket.fetch(hostingId.toString(), Result.class).execute();
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the riak-users