@Test
public void testCreateArchitectureTwoPackages() {

    DependencyGraph dependencyGraph = DependencyGraphFactory.createGraph();
    dependencyGraph.getOrCreateNodeByName("org.a");
    Architecture architecture = new DefaultPackageArchitectureFactory(dependencyGraph).createArchitecture();
    assertThat(architecture.getName(), is("Package"));
    assertThat(architecture.getAllComponents(), hasSize(1));
    assertThat(getComponentNameList(architecture),
            is(Lists.newArrayList("org")));
    assertThat(architecture.getParentComponent("org.a.A").getName(), is("org")); // "org.a" is a leaf!
    assertThat(architecture.getParentComponent("org.a").getName(), is("org"));
    assertThat(architecture.getParentComponent("org"), is(architecture));
    assertThat(architecture.getParentComponent("anythingElse"), nullValue());
}