### Question:
BoundaryEventConverter implements EdgeConverter<BoundaryEvent> { @Override public Result<BpmnEdge> convertEdge(BoundaryEvent event, Map<String, BpmnNode> nodes) { String parentId = event.getAttachedToRef().getId(); String childId = event.getId(); return valid(nodes, parentId, childId) ? Result.success(BpmnEdge.docked(nodes.get(parentId), nodes.get(childId))) : Result.ignored("Boundary ignored", MarshallingMessage.builder() .message("Boundary ignored") .messageKey(MarshallingMessageKeys.boundaryIgnored) .messageArguments(childId, parentId) .type(Violation.Type.WARNING) .build()); }  @Override Result<BpmnEdge> convertEdge(BoundaryEvent event, Map<String, BpmnNode> nodes);  }### Answer:
@Test public void convertEdge() { Map<String, BpmnNode> nodes = new Maps.Builder<String, BpmnNode>() .put(PARENT_ID, node1) .put(CHILD_ID, node2) .build(); Result<BpmnEdge> result = tested.convertEdge(event, nodes); BpmnEdge value = result.value(); assertTrue(result.isSuccess()); assertEquals(node1, value.getSource()); assertEquals(node2, value.getTarget()); assertTrue(value.isDocked()); }
@Test public void convertMissingNodes() { Map<String, BpmnNode> nodes = new HashMap<>(); Result<BpmnEdge> result = tested.convertEdge(event, nodes); BpmnEdge value = result.value(); assertTrue(result.isIgnored()); assertNull(value); }