Fix entity manager test