What is the shortest way to initialise a Properties object with values, to substitute the code below?
Properties properties = new Properties();
properties.put("key1", "value1");
properties.put("key2", "value2");
properties.put("key3", "value3");
I come across this question while creating unit tests, so the code doesn't need to handle many entries, 3-5 is enough. Loading from the file is a good solution for many use cases but want some easy to use solution which requre minimal effort.