public void testInheritance() throws IOException
    {
        Schema<InputSystem> schema = getSchema(InputSystem.class);
        InputSystem sys = new InputSystem();
        KeyBoard kb = new KeyBoard();
        Mouse ms = new Mouse();
        kb.setName("Test");
        kb.setNumberOfKeys(10);
        ms.setName("Test1");
        ms.setNumberOfButtons(2);
        List<InputDevice> devices = new ArrayList<InputDevice>();
        devices.add(ms);
        devices.add(kb);
        sys.setInputDevices(devices);
        ByteArrayOutputStream out = new ByteArrayOutputStream();
        ProtostuffIOUtil.writeTo(out, sys, schema, buf());
        byte[] listData = out.toByteArray();
        InputSystem deserSystem = new InputSystem();
        ByteArrayInputStream in = new ByteArrayInputStream(listData);
        ProtostuffIOUtil.mergeFrom(in, deserSystem, schema, buf());

        assertEquals(sys, deserSystem);
    }
Test ser/deser for subclasses that inherit from non-abstract base types.
<p>
Run this standalone to execute the actual tests.

@author David Yu
@created Jan 21, 2011
protostuff-runtime/src/test/java/io/protostuff/runtime/InheritanceTest.java