@Test
public final void listChildCompanies() {

    OrganisationUtils organisationUtils = new OrganisationUtils();
    Date date = DateUtils.date(2012, 1, 3);
    Company headquarter = organisationUtils.createCompany("总公司", date);
    headquarter.save();
    Department financial = organisationUtils.createDepartment("财务部", headquarter, date);
    Company company1 = organisationUtils.createCompany("分公司1", headquarter, date);
    Company company2 = organisationUtils.createCompany("分公司2", company1, date);
    List<Company> companies = headquarter.listChildCompanies();
    assertTrue(companies.contains(company1));
    assertFalse(companies.contains(company2));
    assertFalse(companies.contains(financial));
}