Fix test suite broken by new TYPE field.
Replace deprecated mock by double.