The basic problem I see is, that you use CommonContextHolder and CommonContext in a static context and Spring is not designed to "deal" with static contexts... simply said.
You were writing about a Spring context which also does not exist in a unit test (here junit5).
If you want to take advantage of the Spring context in a test case you should invoke the test with @SpringBootTest. This will also load all your Spring annotated Beans into the test context. Only then you are able to access these classes in your test setup methods after injection with @Autowired. But they can't be static. Please avoid static classes in a Spring Boot application... for simplicity.
If you want to have the tenant flag editable during runtime, test or production, you need to create an instance of that class. Spring Boot will do this for you. Simply add @Component annotation on class level. Add @SpringbootTest annotation to your test, remove other annotations.
You can get and set tenant context in setup methods and runtime. Provide Getters and Setters of course.
Another way of having the context available and usable in a unit test environment is to mock it, for example with Mockito.
You have to know that unit test are made for testing only simple, small and dedicated parts of code. Spring context usually does not belong to a unit test context. So you have to mock it for that.