How do you unit test Parcelable? I created a Parcelable class, and wrote this unit test
TestClass test = new TestClass(); Bundle bundle = new Bundle(); bundle.putParcelable("test", test); TestClass testAfter = bundle.getParcelable("test"); assertEquals(testAfter.getStuff(), event1.getStuff());
I purposely try to fail the test by returning null in the
createFromParcel(), but it seems to succeed. It looks like it doesn't get parceled until it's needed. How do I force the Bundle to..bundle?