mockResponseWithFunction added