@Test
public void testCreateArchitectureOnePackage() {

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