before entity test