public static <C> Collection<Data> objectToDataCollection(Collection<C> collection,
                                                              SerializationService serializationService) {
        List<Data> dataCollection = new ArrayList<>(collection.size());
        objectToDataCollection(collection, dataCollection, serializationService, null);
        return dataCollection;
    }
@Test
    public void testObjectToDataCollection_deserializeBack() {
        SerializationService serializationService = new DefaultSerializationServiceBuilder().build();
        Collection<Object> list = new ArrayList<>();
        list.add(1);
        list.add("foo");

        Collection<Data> dataCollection = objectToDataCollection(list, serializationService);

        Iterator<Data> it1 = dataCollection.iterator();
        Iterator<Object> it2 = list.iterator();
        while (it1.hasNext() && it2.hasNext()) {
            assertEquals(serializationService.toObject(it1.next()), it2.next());
        }
    }