@Test
public void addSubpackage() {

  ApkPackage aPackage = new ApkPackage("a", null);
  assertEquals("a", aPackage.getName());
  assertEquals("a", aPackage.getFqn());
  assertNull(aPackage.getParent());
  ApkPackage bPackage = aPackage.addSubpackage("b");
  assertEquals("b", bPackage.getName());
  assertEquals("a.b", bPackage.getFqn());
  assertSame(aPackage, bPackage.getParent());
  assertThat(aPackage.getSubpackages()).containsExactly(bPackage);
  ApkPackage cPackage = bPackage.addSubpackage("c");
  assertEquals("c", cPackage.getName());
  assertEquals("a.b.c", cPackage.getFqn());
  assertSame(bPackage, cPackage.getParent());
  assertThat(bPackage.getSubpackages()).containsExactly(cPackage);
}