### Question:
NodeGroup { @Nonnull GroupMember findMember(NodeId id) { GroupMember member = getMember(id); if (member == null) { throw new IllegalArgumentException("no such node " + id); } return member; } NodeGroup(NodeEndpoint endpoint);   NodeGroup(Collection<NodeEndpoint> endpoints, NodeId selfId);   }### Answer:
@Test public void testFindMember() { NodeEndpoint endpoint = new NodeEndpoint("A", "localhost", 2333); NodeGroup group = new NodeGroup(endpoint); Assert.assertNotNull(group.findMember(NodeId.of("A"))); }
@Test(expected = IllegalArgumentException.class) public void testFindMemberNotFound() { NodeEndpoint endpoint = new NodeEndpoint("A", "localhost", 2333); NodeGroup group = new NodeGroup(endpoint); Assert.assertNotNull(group.findMember(NodeId.of("B"))); }