How to initialize something in unit test before the init hook being called?

What you have discovered is that WordPress is loaded—and all of the actions are called—before the tests run. It is possible to hook into an action when WordPress is loaded, but it has to be done from your PHPUnit bootstrap file instead of from the testcase class. I don’t know what your bootstrap file looks like, so I’m going to assume that it is something similar to the one in this tutorial. The main thing that you need to do is load the file containing WordPress’s PHPUnit helper functions (tests/phpunit/includes/functions.php). You’ll need to be including that file because it contains the tests_add_filter() function. And that’s the function you can use to hook into init, like this:

tests_add_filter( 'init', 'my_function_to_call' );

The function works the same as the add_filter() or add_action() functions. You can’t use add_action() though, because WordPress hasn’t been loaded yet, and therefore those functions aren’t available. And as you’ve discovered, you can’t wait until after WordPress is loaded to hook up your function, because then it will be too late. That’s why the tests_add_filter() function exists: so you can hook into WordPress before it is loaded for the tests.