private PlantUmlDiagram createDiagram(List<String> rawDiagramLines) {
        List<String> diagramLines = filterOutComments(rawDiagramLines);
        Set<PlantUmlComponent> components = parseComponents(diagramLines);
        PlantUmlComponents plantUmlComponents = new PlantUmlComponents(components);

        List<ParsedDependency> dependencies = parseDependencies(plantUmlComponents, diagramLines);

        return new PlantUmlDiagram.Builder(plantUmlComponents)
                .withDependencies(dependencies)
                .build();
    }
@Test
    public void parses_multiple_components_and_dependencies() {
        File file = TestDiagram.in(temporaryFolder)
                .component("Component1").withStereoTypes("..origin1..")
                .component("Component2").withStereoTypes("..target1..")
                .component("Component3").withStereoTypes("..origin2..")
                .component("Component4").withStereoTypes("..target2..")
                .dependencyFrom("Component1").to("Component2")
                .dependencyFrom("Component3").to("Component4")
                .write();

        PlantUmlDiagram diagram = createDiagram(file);

        PlantUmlComponent component1 = getComponentWithName("Component1", diagram);
        PlantUmlComponent component2 = getComponentWithName("Component2", diagram);
        PlantUmlComponent component3 = getComponentWithName("Component3", diagram);
        PlantUmlComponent component4 = getComponentWithName("Component4", diagram);

        assertThat(diagram.getAllComponents()).containsOnly(component1, component2, component3, component4);
        assertThat(component1.getDependencies()).containsOnly(component2);
        assertThat(component2.getDependencies().isEmpty()).isTrue();
        assertThat(component3.getDependencies()).containsOnly(component4);
        assertThat(component4.getDependencies().isEmpty()).isTrue();
    }