OKW_Properties extends Properties { public void init() { String Sep = System.getProperty( "file.separator" ); this.clear(); Log.ResOpenList( "Find Properties..." ); Log.ResOpenList( "Find OKW Core Properties..." ); String PropPattern = ".*okw.default.properties.*\\.properties"; String PropPath = "okw" + Sep + "default" + Sep + "properties" + Sep; String PropPathWin = "okw/default/properties/"; ArrayList<String> someProperties = getPropertyFiles( PropPattern, PropPath, PropPathWin); this.CoreProperties.addAll( someProperties ); Log.ResCloseList(); Log.ResOpenList( "Find Project Properties..." ); PropPattern = ".*okw.properties.*\\.properties"; PropPath = "okw" + Sep + "properties" + Sep; PropPathWin = "okw/properties/"; ArrayList<String> some3Properties = getPropertyFiles( PropPattern, PropPath, PropPathWin); this.ResoursesProperties.addAll( some3Properties ); Log.ResCloseList(); Log.ResCloseList(); this.updateProperties(); } private  OKW_Properties(); static OKW_Properties getInstance(); void clear(); void init(); void updateProperties(); Boolean addResource(String fpsResourceName); void addPropertiesFile(String fpsFileName); void PrintProperties(); void PrintPropertiesSources(); ArrayList<String> getKeysStartswith( String Startwitth ); ArrayList<String> getPropertiesForKeysStartswith( String Startwith ); @Override String getProperty(String fpsKey); String getProperty( String fpsKey, String fpsDefault, Object... Parameters ); Boolean getProperty2Boolean(String fpsKey, String fpsDefault );  }
@Test public final void tc_loadFromResourceTest() { myProperties.init(); assertEquals( "Value from core.properties", myProperties.get( "core.test.overwrite" ) ); assertEquals( "core.test.property", myProperties.get( "core.test.property" ) ); assertEquals( "Wert 0 aus properties_Test1", myProperties.get( "Wert0" ) ); assertEquals( "Wert 1 aus properties_Test2", myProperties.get( "Wert1" ) ); assertEquals( "Wert 2 aus properties_Test2", myProperties.get( "Wert2" ) ); assertEquals( "Wert 3 aus properties_Test2", myProperties.get( "Wert3" ) ); assertEquals( "Wert 4 aus properties_Test2", myProperties.get( "Wert4" ) ); assertEquals( "Wert 5 aus properties_Test2", myProperties.get( "Wert5" ) ); }