protected function getServiceInstanceDatabase(ServiceDbInterface $instance)
    {
        $port = current($instance->getHostPorts());

        return (new Database($this->databaseInfoMapping()))
            ->setPort($port)
            ->setUser($instance->username())
            ->setPassword($instance->password())
            ->setProtocol($instance->protocol())
            ->setHostname($instance->getName())
            ->setDatabase($instance->database());
    }