String toEntityType, String relationType, String fromEntityId,
Collection<Entity> expectedEntities) throws Exception
{
Entity randomEntity = entityManager.getEntity(fromEntityType,fromEntityId);
TestCase.assertNotNull(randomEntity);
CollectingEntitySearchResultHandler handler = new CollectingEntitySearchResultHandler();
entityManager.getRelatedEntitiesFrom(randomEntity, new SecurityEntityRelationTypeImpl(relationType,fromEntityType,toEntityType), handler);
basicEntityResultSetChecks(expectedEntities, handler.getResults());
}