### Question:
MongoDbGroupRepository implements GroupRepository { @Override public void delete(Group item) { template.remove(query(where("_id").is(item.getId()))); }  @Override Group findByTitle(String title); @Override Class<? extends Group> getType(); @Override Group get(String id); @Override List<Group> getAll(); @Override List<Group> getLimitedList(int offset, int limit); @Override int getCountAll(); @Override Group save(Group item); @Override void delete(Group item); void setTemplate(MongoGroupOperations template);  }### Answer:
@Test public void delete(){ String id ="id"; Group group = new GroupImpl(); group.setId(id); group.setTitle("title"); groupTemplate.remove(Query.query(Criteria.where("_id").is(id))); expectLastCall(); replay(groupTemplate); repo.delete(group); verify(groupTemplate); }