Extract reference cast test