Use new entity API and deprecate the old tests