コード例 #1
0
 @Test
 public void serializationOfSublist() {
   MutableList<Integer> collection = this.newWith(1, 2, 3, 4, 5);
   MutableList<Integer> deserializedCollection =
       SerializeTestHelper.serializeDeserialize(collection.subList(0, 2));
   Verify.assertSize(2, deserializedCollection);
   Verify.assertStartsWith(deserializedCollection, 1, 2);
   Assert.assertEquals(collection.subList(0, 2), deserializedCollection);
 }
コード例 #2
0
 @Override
 @Test
 public void serialization() {
   MutableList<Integer> collection = this.newWith(1, 2, 3, 4, 5);
   MutableList<Integer> deserializedCollection =
       SerializeTestHelper.serializeDeserialize(collection);
   Verify.assertSize(5, deserializedCollection);
   Verify.assertStartsWith(deserializedCollection, 1, 2, 3, 4, 5);
   Assert.assertEquals(collection, deserializedCollection);
 }