class AssociationConverter {

    public Result<BasePropertyWriter> toFlowElement(Edge<?, ?> edge, ElementContainer process) {
        ViewConnector<Association> connector = (ViewConnector<Association>) edge.getContent();
        Association definition = connector.getDefinition();
        org.eclipse.bpmn2.Association association = bpmn2.createAssociation();
        AssociationPropertyWriter p = propertyWriterFactory.of(association);

        association.setId(edge.getUUID());

        BasePropertyWriter pSrc = process.getChildElement(edge.getSourceNode().getUUID());

        BasePropertyWriter pTgt = process.getChildElement(edge.getTargetNode().getUUID());

        if (pSrc == null || pTgt == null) {
            String msg = "BasePropertyWriter was not found for source node or target node at edge: " + edge.getUUID() + ", pSrc = " + pSrc + ", pTgt = " + pTgt;
            return Result.failure(msg);
        }

        p.setSource(pSrc);
        p.setTarget(pTgt);

        p.setConnection(connector);

        BPMNGeneralSet general = definition.getGeneral();
        p.setDocumentation(general.getDocumentation().getValue());
        p.setDirectionAssociation(definition);

        return Result.of(p);
    }

    public  AssociationConverter(PropertyWriterFactory propertyWriterFactory);

}