List of usage examples for java.io ObjectStreamClass lookup
public static ObjectStreamClass lookup(Class<?> cl)
From source file:ponzu.impl.test.Verify.java
public static void assertSerializedForm(long expectedSerialVersionUID, String expectedBase64Form, Object actualObject) {//from ww w. ja va 2s . c o m try { assertInstanceOf(Serializable.class, actualObject); assertEquals("Serialization was broken. Contact a senior architect for approval.", expectedBase64Form, encodeObject(actualObject)); Object decodeToObject = decodeObject(expectedBase64Form); Assert.assertEquals("serialVersionUID's differ", expectedSerialVersionUID, ObjectStreamClass.lookup(decodeToObject.getClass()).getSerialVersionUID()); } catch (AssertionError e) { throwMangledException(e); } }