}
public void testHashtableIO() {
try {
ByteArrayOutputStream baos = new ByteArrayOutputStream();
ObjectOutputStreamMicro oosm = new ObjectOutputStreamMicro(baos);
Hashtable hashtable = new Hashtable();
hashtable.put("one", "1");
hashtable.put("two", "2");
hashtable.put("three", "3");
hashtable.put("four", "4");
oosm.writeObject(hashtable);
ByteArrayInputStream bais = new ByteArrayInputStream(baos.toByteArray());
ObjectInputStreamMicro oism = new ObjectInputStreamMicro(bais);
Object obj = oism.readObject();
assertTrue("hashtable is not of type 'Hashtable', it is " + obj.getClass().getName(), obj instanceof Hashtable);
Hashtable table = (Hashtable)obj;