コード例 #1
0
 @Test
 public void testSerialize() {
   Data data = serializationService.toData(list);
   List<Integer> deserializedList = serializationService.toObject(data);
   int size = list.size();
   assertEquals(size, deserializedList.size());
   for (int i = 0; i < size; i++) {
     assertEquals(list.get(i), deserializedList.get(i));
   }
 }
コード例 #2
0
 @Test
 public void testGet() {
   int i = randomInt();
   assertEquals(i, (int) list.get(i));
 }