@@ -0,0 +1,1539 @@
+package com.uber.hoodie.config;%0A%0Aimport static org.junit.Assert.*;%0A%0Aimport com.google.common.collect.Maps;%0Aimport com.uber.hoodie.config.HoodieWriteConfig.Builder;%0Aimport java.io.ByteArrayInputStream;%0Aimport java.io.ByteArrayOutputStream;%0Aimport java.io.IOException;%0Aimport java.util.Date;%0Aimport java.util.Map;%0Aimport java.util.Properties;%0Aimport org.junit.Test;%0A%0Apublic class HoodieWriteConfigTest %7B%0A  @Test%0A  public void testPropertyLoading() throws IOException %7B%0A    Builder builder = HoodieWriteConfig.newBuilder().withPath(%22/tmp%22);%0A    Map%3CString, String%3E params = Maps.newHashMap();%0A    params.put(HoodieCompactionConfig.MAX_COMMITS_TO_KEEP, %225%22);%0A    params.put(HoodieCompactionConfig.MIN_COMMITS_TO_KEEP, %222%22);%0A    ByteArrayOutputStream outStream = saveParamsIntoOutputStream(params);%0A    ByteArrayInputStream inputStream = new ByteArrayInputStream(outStream.toByteArray());%0A    try %7B%0A      builder = builder.fromInputStream(inputStream);%0A    %7D finally %7B%0A      outStream.close();%0A      inputStream.close();%0A    %7D%0A    HoodieWriteConfig config = builder.build();%0A    assertEquals(config.getMaxCommitsToKeep(), 5);%0A    assertEquals(config.getMinCommitsToKeep(), 2);%0A%7D%0A%0A  private ByteArrayOutputStream saveParamsIntoOutputStream(Map%3CString, String%3E params) throws IOException %7B%0A    Properties properties = new Properties();%0A    properties.putAll(params);%0A    ByteArrayOutputStream outStream = new ByteArrayOutputStream();%0A    properties.store(outStream, %22Saved on %22 + new Date(System.currentTimeMillis()));%0A    return outStream;%0A  %7D%0A%7D

Test to check if properties set are properly propogated