final Set<PackageVO> packages = EntityFinder.findAllEntities(basePackages);
assertThat(packages).isNotNull().isNotEmpty().hasSize(1);
final PackageVO p = packages.iterator().next();
assertThat(p).isNotNull().isEqualTo(new PackageVO(RefA.class.getPackage().getName()));
assertThat(p.getEntities()).isNotNull().isNotEmpty().hasSize(TestInfo.numberOfEntitiesInSubPackage);
final EntityVO e1 = packages.iterator().next().getEntities().get(0);
final EntityVO e2 = packages.iterator().next().getEntities().get(1);
assertThat(e1).isNotNull().isEqualTo(new EntityVO("RefA"));
assertThat(e2).isNotNull().isEqualTo(new EntityVO("RefB"));
assertThat(e1.getQueries()).isNotNull().isNotEmpty().hasSize(1);
assertThat(e2.getQueries()).isNotNull().isNotEmpty().hasSize(2);
assertThat(e1.getQueries().iterator().next().getName()).isNotNull().isEqualTo("findByReferenceADescription");
assertThat(e1.getQueries().iterator().next().getJPQLQuery()).isNotNull().isEqualTo("select ent from RefA ent where ent.description like :descr");
assertThat(e2.getQueries().iterator().next().getName()).isNotNull().isEqualTo("getRefBByCode");
assertThat(e2.getQueries().iterator().next().getJPQLQuery()).isNotNull().isEqualTo("select ent from RefB ent where ent.code = :code");
}