@Override
    public <T> T getOrDefault(Class<T> type, T defaultValue) {
        return firstNonNull(get(type), defaultValue);
    }
@Test
    public void getOrDefaultReturnsDefaultValueOnNonExistingConfig() throws Exception {
        @SuppressWarnings("deprecation")
        final DBCollection collection = mongoConnection.getDatabase().getCollection(COLLECTION_NAME);
        assertThat(collection.count()).isEqualTo(0L);

        CustomConfig defaultValue = new CustomConfig();
        defaultValue.text = "DEFAULT";

        assertThat(clusterConfigService.getOrDefault(CustomConfig.class, defaultValue)).isSameAs(defaultValue);
    }