java – How do I autowire within a @Configuration class during JUnit tests?

I am testing a module of my multi-module boot project.
I am testing the unit of a class noted as @Configuration. There is a method that uses a class that is injected with @Autowired. During the JUnit tests, I got a NullPointer because the Autowired is not working. How to make it work?

I tried some annotations found in other answers.

@RunWith (SpringRunner.class)
@ContextConfiguration (classes = {BasicConfiguration.class, SomeClass.class})
@TestPropertySource (locations = "classpath:")
public class BasicConfigurationTest {

BasicConfiguration basicConfig;
Basic class public configuration {

Private SomeClass someClass; <--- this is not working

AnotherClass someMethod () {
someClass.doSomething (); <--- null pointer

some kind must be injected