A USphereComponent isn’t an actor. It’s a UActorComponent which is meant to be attached to an actor. Actor classes begin with the letter A. AActor, APawn, ACharacter, etc. The first line of code will result in a run-time error because of this.
If you’re attempting to create a sphere component to attach to your test actor then you’d use CreateDefaultSubobject in the constructor.