@Test(expected = AttributeException.class)
public void addThrowsAttributeException() {

  String attributeName = "name";
  MyObject object = new MyObject();
  Set<String> keySet = new HashSet<String>();
  keySet.add("ada");
  doReturn(keySet).when(indexes).keySet();
  doReturn(cacheIndex).when(indexes).get(attributeName);
  doNothing().when(cacheIndex).put(object, object);
  handler.add(object, object);
}