@Test
public void testListGetMandatoryConfig() throws IOException {

  // Test one null value.
  Configuration config = new Configuration();
  config.set(PROPERTY_ONE.getKey(), VALUE_ONE);
  assertThrows(
      IOException.class,
      () -> getMandatoryConfig(config, Lists.newArrayList(PROPERTY_ONE, PROPERTY_TWO)));
  // Test one empty string.
  config.set(PROPERTY_TWO.getKey(), "");
  assertThrows(
      IOException.class,
      () -> getMandatoryConfig(config, Lists.newArrayList(PROPERTY_ONE, PROPERTY_TWO)));
  // Test proper setting.
  config.set(PROPERTY_TWO.getKey(), VALUE_TWO);
  Map<String, String> expectedMap = new HashMap<>();
  expectedMap.put(PROPERTY_ONE.getKey(), VALUE_ONE);
  expectedMap.put(PROPERTY_TWO.getKey(), VALUE_TWO);
  assertThat(getMandatoryConfig(config, Lists.newArrayList(PROPERTY_ONE, PROPERTY_TWO)))
      .isEqualTo(expectedMap);
}