Programatic stubbing