@Test
public void add() {

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