AdditionalPropertiesParser { public static Properties merge(Properties base, Properties addtional){ Properties properties = new Properties(); properties.putAll(base); if(addtional != null){ for(String key : addtional.stringPropertyNames()){ properties.putIfAbsent(key, addtional.getProperty(key)); } } return properties; } AdditionalPropertiesParser(String propertiesString); static Properties merge(Properties base, Properties addtional); Properties parse();  }
@Test(dataProvider = "MergingResultProvider") public void testMerge(Properties base, Properties additional, Properties expectedMergeResult) throws Exception { assertEquals(expectedMergeResult, AdditionalPropertiesParser.merge(base, additional), "Wrong result properties from merging found."); }