mc

%% Empty

c1 = collection

%% With some objects

c2 = collection(ao(1), plist('key', 'value'), ssm)

c2r = c2.rebuild

eq(c2r,c2, 'created', 'proctime', 'UUID')


%% Vector

c1 = collection(ao(1), ssm)
c2 = collection(ao(1), pzmodel)

cvc = collection([c1 c2])


%% With plist

c3 = collection()

c3.addObjects(ao(2))

c3.addObjects(ao(2), plist('key', 'value'))


c3.addObjects(plist('objs', {ao(3), ssm}))

c3.addObjects(plist('objs', [ao(4) ao(5)]))

%% Save/load

save(c3, 'c3.xml')

c3l = collection('c3.xml')

eq(c3, c3l)


save(c3, 'c3.mat')

c3l = collection('c3.mat')

eq(c3, c3l)


