### Question:
Groups { public GroupInfo getGroup(String groupName) { for (GroupInfo group : this.groups) { if (group.getName().equals(groupName)) { return group; } } return null; }  List<String> getGroupNames(); Boolean any(String... groupNames); GroupInfo getGroup(String groupName);  }### Answer:
@Test public void should_returnGroupInfo_when_groupsContainsGroupName() { Groups sut = this.generateSut(); assertEquals("group.1", sut.getGroup("group.1").getName()); }
@Test public void should_returnNull_when_groupsDoesNotContainGroupName() { Groups sut = this.generateSut(); assertNull(sut.getGroup("group.43")); }