replaced _entity with _cast; added BatchDeprecationTestCase