tests if stub works correctly