class PropertiesConverter {

	private static final String LINE_SEPARATOR = "\n";

	// prevents the class from being instantiated
	private PropertiesConverter() {
	}

	/**
	 * Parse a String to a Properties object. If string is empty, an empty Properties
	 * object will be returned. The input String should be a set of key=value pairs,
	 * separated by a new line.
	 * @param stringToParse String to parse. Must not be {@code null}.
	 * @return Properties parsed from each key=value pair.
	 */
	public static Properties stringToProperties(@NonNull String stringToParse) {
		Assert.notNull(stringToParse, "stringToParse must not be null");
		if (!StringUtils.hasText(stringToParse)) {
			return new Properties();
		}
		Properties properties = new Properties();
		String[] keyValuePairs = stringToParse.split(LINE_SEPARATOR);
		for (String string : keyValuePairs) {
			if (!string.contains("=")) {
				throw new IllegalArgumentException(string + "is not a valid key=value pair");
			}
			String[] keyValuePair = string.split("=");
			properties.setProperty(keyValuePair[0], keyValuePair[1]);
		}
		return properties;
	}

	/**
	 * Convert a Properties object to a String. This is only necessary for compatibility
	 * with converting the String back to a properties object. If an empty properties
	 * object is passed in, a blank string is returned, otherwise it's string
	 * representation is returned.
	 * @param propertiesToParse contains the properties to be converted. Must not be
	 * {@code null}.
	 * @return String representation of the properties object
	 */
	public static String propertiesToString(@NonNull Properties propertiesToParse) {<FILL_FUNCTION_BODY>}

}

		Assert.notNull(propertiesToParse, "propertiesToParse must not be null");
		if (propertiesToParse.isEmpty()) {
			return "";
		}
		List<String> keyValuePairs = new ArrayList<>();
		for (Map.Entry<Object, Object> entry : propertiesToParse.entrySet()) {
			keyValuePairs.add(entry.getKey() + "=" + entry.getValue());
		}
		return String.join(LINE_SEPARATOR, keyValuePairs);
	
<no_super_class>