@Override
    public Optional<GaugeMetricFamilyMetricsCollector> export(final String pluginType) {
        if (null == ProxyContext.getInstance().getContextManager()) {
            return Optional.empty();
        }
        GaugeMetricFamilyMetricsCollector result = MetricsCollectorRegistry.get(config, pluginType);
        result.cleanMetrics();
        MetaDataContexts metaDataContexts = ProxyContext.getInstance().getContextManager().getMetaDataContexts();
        result.addMetric(Collections.singletonList("database_count"), metaDataContexts.getMetaData().getDatabases().size());
        result.addMetric(Collections.singletonList("storage_unit_count"), getStorageUnitCount(metaDataContexts));
        return Optional.of(result);
    }
@Test
    void assertExportWithoutContextManager() {
        when(ProxyContext.getInstance().getContextManager()).thenReturn(null);
        assertFalse(new ProxyMetaDataInfoExporter().export("FIXTURE").isPresent());
    }