### Question:
AddNodeTask extends AbstractGroupConfigChangeTask { @Override public boolean isTargetNode(NodeId nodeId) { return endpoint.getId().equals(nodeId); } AddNodeTask(GroupConfigChangeTaskContext context, NodeEndpoint endpoint, NewNodeCatchUpTaskResult newNodeCatchUpTaskResult);  AddNodeTask(GroupConfigChangeTaskContext context, NodeEndpoint endpoint, int nextIndex, int matchIndex); @Override boolean isTargetNode(NodeId nodeId); @Override String toString();  }### Answer:
@Test public void testIsTargetNode() { AddNodeTask task = new AddNodeTask( new WaitableGroupConfigChangeTaskContext(), new NodeEndpoint("D", "localhost", 2336), 2, 1 ); Assert.assertTrue(task.isTargetNode(NodeId.of("D"))); Assert.assertFalse(task.isTargetNode(NodeId.of("E"))); }