test for onSuccess