out = new ObjectOutputStream(os);
out.writeObject(logger);
byte[] serialize = os.toByteArray();
assertNotNull(serialize);
//System.out.println(new String(serialize));
logger.debug("Serialize OK. length=" + serialize.length);
//FileInputStream is = new FileInputStream("logger.ser");
ByteArrayInputStream is = new ByteArrayInputStream(serialize);
in = new ObjectInputStream(is);
Object obj = in.readObject();