### Question:
JavaPackage implements Comparable<JavaPackage> { public boolean isWithin(final JavaPackage otherPackage) { return otherPackage != null && fullyQualifiedPackageName.startsWith(otherPackage.getFullyQualifiedPackageName()); } JavaPackage(final String fullyQualifiedPackageName);  JavaPackage(final String fullyQualifiedPackageName, final String module); int compareTo(final JavaPackage o); @Override boolean equals(final Object obj); List<String> getElements(); String getFullyQualifiedPackageName(); String getModule(); String getLastElement(); @Override int hashCode(); boolean isWithin(final JavaPackage otherPackage); @Override String toString();  }### Answer:
@Test public void testChildPackageIsWithinParent() { assertTrue(CHILD.isWithin(PARENT)); }
@Test public void testPackageIsNotWithinNullPackage() { assertFalse(PARENT.isWithin(null)); }
@Test public void testPackageIsWithinSelf() { assertTrue(PARENT.isWithin(PARENT)); }
@Test public void testParentPackageIsNotWithinChild() { assertFalse(PARENT.isWithin(CHILD)); }