Replace deprecated mock() syntax.