public static Options optionsFromYaml(File yamlFile) throws Exception {
        ObjectMapper mapper = new ObjectMapper(new YAMLFactory());
        mapper.configure(MapperFeature.ALLOW_FINAL_FIELDS_AS_MUTATORS, true);
        mapper.setVisibility(PropertyAccessor.FIELD, JsonAutoDetect.Visibility.ANY);

        //Parse out a Builder...then build it.
        return mapper.readValue(yamlFile, KafkaIngestor.Options.class);
    }
@Test
    public void canBuildOptionsFromYaml() throws Exception {

        //load the yaml file that encodes a KafkaIngestor.Options
        ClassLoader classLoader = Thread.currentThread().getContextClassLoader();
        File yamlFile = new File(classLoader.getResource("kafkaIngestorOptions.yaml").getFile());

        /* This Factory method reads the yaml file (which overrides values from the default constructor) */
        KafkaIngestor.Options options = KafkaIngestor.optionsFromYaml(yamlFile);

        assertThat(options.pointPrefetchLimit, is(500001));
        assertThat(options.numWorkerThreads, is(5));
        assertThat(options.milliSecBtwPollAttempts, is(2001));
        assertThat(options.useConsumerGroups, is(false));
        assertThat(options.minPartition, is(2));
        assertThat(options.maxPartition, is(4));
        assertThat(options.pointTopic, is("omgPOINTS"));
    }