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: applicationTest-configs-ok.properties")
public class BasicConfigurationTest {

@Autowired
BasicConfiguration basicConfig;
@Configuration
Basic class public configuration {

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

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

some kind must be injected