protected byte[] mapToPropertiesToBytes(Map<String, Object> testMap2)
throws IOException, SerializationException {
Serializer<Map<?, ?>> serializer = new PropertiesSerializer();
ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
serializer.writeObject(testMap2, outputStream);
outputStream.flush();
outputStream.close();
String result = outputStream.toString();