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_component_name_that_clashes_with_alias_definition() {
        PlantUmlDiagram diagram = createDiagram(TestDiagram.in(temporaryFolder)
                .component("tricky as hell cause of as keyword").withAlias("alias").withStereoTypes("..any..")
                .write());

        PlantUmlComponent trickyAsHell = getComponentWithName("tricky as hell cause of as keyword", diagram);

        assertThat(trickyAsHell.getComponentName()).isEqualTo(new ComponentName("tricky as hell cause of as keyword"));
        assertThat(trickyAsHell.getAlias().get()).isEqualTo(new Alias("alias"));
    }