"\Drupal::$container is not initialized yet. \Drupal::setContainer() must be called with a real container."
You need to mock the services you will be using in your test, so that they return values. You can do that as follows:

public function testDefaultBehavior() {
  $some_resolver = $this-&gt;getMockBuilder('Drupal\namespace\for\custom_utils\someresolver')
    -&gt;disableOriginalConstructor()
    -&gt;getMock();
  $config_factory = $this-&gt;getMockBuilder('Drupal\Core\Config\ConfigFactory')
    -&gt;disableOriginalConstructor()
    -&gt;getMock();
    $service = new CustomService($some_resolver, $config_factory);


}

Note that you should use the actual interface (or class if you have no interface) instead of Drupal\namespace\for\custom_utils\someresolver

You'll need to set up expectations to return the values from the services you mocked. You can read more on that here:

https://www.drupal.org/docs/8/phpunit/understanding-phpunit-expectations