Fixes and improvements for SerializationTest

The tests were order-dependent and flawed: test support classes
were used in multiple tests but each relied on it being possible
to detect static initialization of those classes. There was an
incorrect assertion.

This change splits out unique test support classes for those
that need them, adds more assertions and fixes the broken
assertion. Also tidies up some warnings.

Bug: 23031484
Change-Id: Ia3bb32dd1dbd02a74931604cae424d7e9312c76d
(cherry picked from commit 729d4ecafff8e6af5a71e4fecb2007917cbc2e2a)
1 file changed