*/
public class SerializabilityTest extends GxpcTestCase {
public void testCallables() throws Exception {
SourcePosition pos = pos();
Template template1 = template(pos, "com.google.foo.Bar", schema("text/html"),
Collections.<Import>emptyList(),
Collections.<ThrowsDeclaration>emptyList(),
Collections.<Parameter>emptyList(),
Collections.<FormalTypeParameter>emptyList(),
str("foo"));
Template template2 = template(pos, "com.google.foo.Bar", schema("text/html"),
Collections.<Import>emptyList(),
Collections.<ThrowsDeclaration>emptyList(),
Collections.<Parameter>emptyList(),
Collections.<FormalTypeParameter>emptyList(),
str("foo"));
Interface iface1 = iface(pos, "com.google.foo.Bar", schema("text/html"),
Collections.<Import>emptyList(),
Collections.<ThrowsDeclaration>emptyList(),
Collections.<Parameter>emptyList(),
Collections.<FormalTypeParameter>emptyList());
Interface iface2 = iface(pos, "com.google.foo.Bar", schema("text/html"),
Collections.<Import>emptyList(),
Collections.<ThrowsDeclaration>emptyList(),
Collections.<Parameter>emptyList(),
Collections.<FormalTypeParameter>emptyList());
assertSerializes(template1.getCallable(), template2.getCallable());
assertSerializes(template1.getInstanceCallable(), template2.getInstanceCallable());
assertSerializes(iface1.getCallable(), iface2.getCallable());
assertSerializes(iface1.getInstanceCallable(), iface2.getInstanceCallable());
assertSerializes(iface1.getImplementable(), iface2.getImplementable());
}