public static MongoSourceConfig load(String yamlFile) throws IOException {
        final ObjectMapper mapper = new ObjectMapper(new YAMLFactory());
        final MongoSourceConfig cfg = mapper.readValue(new File(yamlFile), MongoSourceConfig.class);

        return cfg;
    }
@Test
    public void testLoadMapConfigUriFromSecret() throws IOException {
        final Map<String, Object> configMap = TestHelper.createCommonConfigMap();
        TestHelper.putSyncType(configMap, TestHelper.SYNC_TYPE);
        configMap.remove("mongoUri");

        SourceContext sourceContext = Mockito.mock(SourceContext.class);
        Mockito.when(sourceContext.getSecret("mongoUri"))
                .thenReturn(TestHelper.URI);
        final MongoSourceConfig cfg = MongoSourceConfig.load(configMap, sourceContext);

        assertEquals(cfg.getMongoUri(), TestHelper.URI);
        assertEquals(cfg.getDatabase(), TestHelper.DB);
        assertEquals(cfg.getCollection(), TestHelper.COLL);
        assertEquals(cfg.getSyncType(), TestHelper.SYNC_TYPE);
        assertEquals(cfg.getBatchSize(), TestHelper.BATCH_SIZE);
        assertEquals(cfg.getBatchTimeMs(), TestHelper.BATCH_TIME);
    }