package dev.kkorolyov.sqlob;

import java.io.File;
import java.io.IOException;
import java.io.UncheckedIOException;

import dev.kkorolyov.simpleprops.Properties;

@SuppressWarnings("javadoc")
public class TestAssets {
	private static final String HOST = "HOST",
															DATABASE = "DATABASE",
															USER = "USER",
															PASSWORD = "PASSWORD";	
	private static final Properties props = new Properties(new File("TestSQLOb.ini"), buildDefaults());
	
	static {
		try {
			props.saveFile();
		} catch (IOException e) {
			throw new UncheckedIOException(e);
		}
	}
	
	public static String host() {
		return props.get(HOST);
	}
	public static String database() {
		return props.get(DATABASE);
	}
	public static String user() {
		return props.get(USER);
	}
	public static String password() {
		return props.get(PASSWORD);
	}
	
	private static Properties buildDefaults() {
		Properties defaults = new Properties();
		defaults.put(HOST, "");
		defaults.put(DATABASE, "");
		defaults.put(USER, "");
		defaults.put(PASSWORD, "");
		
		return defaults;
	}
}

package dev.kkorolyov.sqlob;

import java.io.IOException;
import java.io.UncheckedIOException;

import dev.kkorolyov.simpleprops.Properties;

@SuppressWarnings("javadoc")
public class TestAssets {
	private static final String TEST_PROPERTIES_NAME = "TestSQLOb.ini";
	private static final String HOST = "HOST",
															DATABASE = "DATABASE",
															USER = "USER",
															PASSWORD = "PASSWORD";
	private static final String[][] defaults = {{HOST, ""},
																							{DATABASE, ""},
																							{USER, "postgres"},
																							{PASSWORD, ""}};
	private static final Properties props = Properties.getInstance(TEST_PROPERTIES_NAME, defaults);
	
	static {
		try {
			props.saveToFile();
		} catch (IOException e) {
			throw new UncheckedIOException(e);
		}
	}
	
	public static String host() {
		return props.getValue(HOST);
	}
	public static String database() {
		return props.getValue(DATABASE);
	}
	public static String user() {
		return props.getValue(USER);
	}
	public static String password() {
		return props.getValue(PASSWORD);
	}
}

--- 
+++ 
@@ -1,5 +1,6 @@
 package dev.kkorolyov.sqlob;
 
+import java.io.File;
 import java.io.IOException;
 import java.io.UncheckedIOException;
 
@@ -7,35 +8,40 @@
 
 @SuppressWarnings("javadoc")
 public class TestAssets {
-	private static final String TEST_PROPERTIES_NAME = "TestSQLOb.ini";
 	private static final String HOST = "HOST",
 															DATABASE = "DATABASE",
 															USER = "USER",
-															PASSWORD = "PASSWORD";
-	private static final String[][] defaults = {{HOST, ""},
-																							{DATABASE, ""},
-																							{USER, "postgres"},
-																							{PASSWORD, ""}};
-	private static final Properties props = Properties.getInstance(TEST_PROPERTIES_NAME, defaults);
+															PASSWORD = "PASSWORD";	
+	private static final Properties props = new Properties(new File("TestSQLOb.ini"), buildDefaults());
 	
 	static {
 		try {
-			props.saveToFile();
+			props.saveFile();
 		} catch (IOException e) {
 			throw new UncheckedIOException(e);
 		}
 	}
 	
 	public static String host() {
-		return props.getValue(HOST);
+		return props.get(HOST);
 	}
 	public static String database() {
-		return props.getValue(DATABASE);
+		return props.get(DATABASE);
 	}
 	public static String user() {
-		return props.getValue(USER);
+		return props.get(USER);
 	}
 	public static String password() {
-		return props.getValue(PASSWORD);
+		return props.get(PASSWORD);
+	}
+	
+	private static Properties buildDefaults() {
+		Properties defaults = new Properties();
+		defaults.put(HOST, "");
+		defaults.put(DATABASE, "");
+		defaults.put(USER, "");
+		defaults.put(PASSWORD, "");
+		
+		return defaults;
 	}
 }
Update tests to new SimpleProps
