	@Test
	public void testHierarchyPackages4() {

		List<JavaPackage> packages = asList(
				newPkg("a.p1"),
				newPkg("a.b.c.p2"),
				newPkg("a.b.c.p3"),
				newPkg("d.e"),
				newPkg("d.f.a"));
		List<JPackage> out = sources.getHierarchyPackages(packages);

		assertThat(out, hasSize(2));
		assertThat(out.get(0).getName(), is("a"));
		assertThat(out.get(0).getInnerPackages(), hasSize(2));
		assertThat(out.get(1).getName(), is("d"));
		assertThat(out.get(1).getInnerPackages(), hasSize(2));
	}