PropertiesLoader { public static String[] splitKeyVal(String line) { return line.split("=", 2); } PropertiesLoader(CryptoService cryptoService);  PropertiesLoader(); Map<String, String> loadFromList(List<String> lines); Map<String, String> loadFromFile(String path); static String unwrapEncryptedValue(String encValue); String parseValue(String value); static String[] splitKeyVal(String line);  }
@Test public void splitKeyValueSettingsLineTest() { String[] keyval = PropertiesLoader.splitKeyVal("password=crap"); assertEquals("password", keyval[0]); assertEquals("crap", keyval[1]); }
@Test public void shouldAllowEqualsSignInSettingsValue() { String key = "password"; String value = "One=Two-Three=="; String[] keyval = PropertiesLoader.splitKeyVal( key + "=" + value); assertEquals(key, keyval[0]); assertEquals(value, keyval[1]); }