  @Test
  public void shouldParse() {

    // given
    final RawConfig config = new RawConfig();
    final ProducerConfig producerConfig = producerConfigParser.parse(new RawProducerConfig());
    final RecordsConfig recordsConfig = recordsConfigParser.parse(new RawRecordsConfig());
    config.maxInFlightRecords = 2;
    config.inFlightRecordCheckIntervalMs = 500L;

    // when
    final Config parsed = parser.parse(config);

    // then
    assertThat(parsed.getProducer()).isEqualTo(producerConfig);
    assertThat(parsed.getRecords()).isEqualTo(recordsConfig);
    assertThat(parsed.getMaxInFlightRecords()).isEqualTo(2);
    assertThat(parsed.getInFlightRecordCheckInterval()).isEqualTo(Duration.ofMillis(500));
  }