Why not use ?assertMatch or ?assertEqual here, e.g.:

```erlang
?assertMatch({error, _}, riakc_obj:new(<<"b">>, <<"">>))
%% or
?assertEqual({error, zero_length_key}, riakc_obj:new(<<"b">>, <<"">>))
```