updated test for types of referenced entities