def METHOD_NAME(self):
    sds = SpatialDatasetService(
        name="test_sds",
        engine=SpatialDatasetService.GEOSERVER,
        endpoint="http://localhost/geoserver/rest/",
        public_endpoint="http://publichost/geoserver/rest/",
        apikey="test_api",
        username="foo",
        password="password",
    )
    sds.save()
    sds_setting = self.test_app.settings_set.select_subclasses().get(
        name="primary_geoserver"
    )
    sds_setting.spatial_dataset_service = sds
    sds_setting.save()
    # Check as_engine
    ret = (
        self.test_app.settings_set.select_subclasses()
        .get(name="primary_geoserver")
        .get_value(as_engine=True)
    )
    # Check result
    self.assertEqual("GEOSERVER", ret.type)
    self.assertEqual("http://localhost/geoserver/rest/", ret.endpoint)
    # Check as wms
    ret = (
        self.test_app.settings_set.select_subclasses()
        .get(name="primary_geoserver")
        .get_value(as_wms=True)
    )
    # Check result
    self.assertEqual("http://localhost/geoserver/wms", ret)
    # Check as wfs
    ret = (
        self.test_app.settings_set.select_subclasses()
        .get(name="primary_geoserver")
        .get_value(as_wfs=True)
    )
    # Check result
    self.assertEqual("http://localhost/geoserver/ows", ret)
    # Check as wcs
    ret = (
        self.test_app.settings_set.select_subclasses()
        .get(name="primary_geoserver")
        .get_value(as_wcs=True)
    )
    # Check result
    self.assertEqual("http://localhost/geoserver/wcs", ret)
    # Check as_endpoint
    ret = (
        self.test_app.settings_set.select_subclasses()
        .get(name="primary_geoserver")
        .get_value(as_endpoint=True)
    )
    # Check result
    self.assertEqual("http://localhost/geoserver/rest/", ret)
    # Check as_endpoint
    ret = (
        self.test_app.settings_set.select_subclasses()
        .get(name="primary_geoserver")
        .get_value(as_public_endpoint=True)
    )
    # Check result
    self.assertEqual("http://publichost/geoserver/rest/", ret)