Configs { public static String getSystemPropertyWithMavenPropertyAsFallback(Properties properties, String key) { String val = System.getProperty(key); if (val == null && properties != null) { val = properties.getProperty(key); } return val; }  static float asFloat(String value); static int asInt(String value); static Integer asInteger(String value); static boolean asBoolean(String value); static String asString(String value); static String getSystemPropertyWithMavenPropertyAsFallback(Properties properties, String key);  }
@Test public void getPropertyValueTest(){ properties.setProperty(KEY_1, value); System.setProperty(KEY_2, value); assertEquals("value",Configs.getSystemPropertyWithMavenPropertyAsFallback(properties, KEY_1)); assertEquals("value",Configs.getSystemPropertyWithMavenPropertyAsFallback(properties, KEY_2)); assertEquals(null,Configs.getSystemPropertyWithMavenPropertyAsFallback(properties, KEY_3)); }