### Question:
DefaultGroupService implements GroupService { @Override public List<Group> getAllGroups() { return groupRepository.getAll(); } @Autowired  DefaultGroupService(GroupRepository groupRepository); @Override Group getGroupByID(String id); @Override List<Group> getAllGroups(); @Override Group getGroupByTitle(String title); @Override Group save(Group group);  }### Answer:
@Test public void allGroups() { List<Group> tags = new ArrayList<Group>(); Group group = createGroup("test"); tags.add(group); expect(repository.getAll()).andReturn(tags); replay(repository); List<Group> allGroups = service.getAllGroups(); verify(repository); assertTrue(allGroups.size() > 0); }