assertEquals( isVolatile, desc.isVolatile() );
}
public void testSerialization() throws IOException, ClassNotFoundException
{
EntryDescriptor entry = new EntryDescriptor( m_key, m_type, m_optional, m_volatile, m_alias );
checkEntry( entry, m_key, m_type, m_optional, m_volatile, m_alias );
File file = new File( "test.out" );
ObjectOutputStream oos = new ObjectOutputStream( new FileOutputStream( file ) );
oos.writeObject( entry );
oos.close();
ObjectInputStream ois = new ObjectInputStream( new FileInputStream( file ) );
EntryDescriptor serialized = (EntryDescriptor) ois.readObject();
ois.close();
file.delete();
checkEntry( serialized, m_key, m_type, m_optional, m_volatile, m_alias );
assertEquals( entry, serialized );
assertEquals( entry.hashCode(), serialized.hashCode() );
}