class FormGenerationModelProviderHelper {

    @SuppressWarnings("unchecked")
    public Definitions generate(final Diagram diagram) throws IOException {
        DiagramMarshaller diagramMarshaller = backendService.getDiagramMarshaller();
        return ((BaseDirectDiagramMarshaller) diagramMarshaller).marshallToBpmn2Definitions(diagram);
    }

    public  FormGenerationModelProviderHelper(final AbstractDefinitionSetService backendService);

}