Introduce object mechanism to VCs in vc conversion tool

Change-Id: If5d06a0b9b08b9c39700a0eb471a0edfb0d5daf5
diff --git a/t/list2vc-obj.t b/t/list2vc-obj.t
new file mode 100644
index 0000000..d4bbd80
--- /dev/null
+++ b/t/list2vc-obj.t
@@ -0,0 +1,23 @@
+#!/usr/bin/env perl
+use strict;
+use warnings;
+use Test::More;
+use Data::Dumper;
+use Mojo::JSON 'decode_json';
+
+require_ok 'KorAP::VirtualCorpus::Group';
+
+my $vc = KorAP::VirtualCorpus::Group->new;
+$vc->union_field('author', 'Goethe');
+$vc->union_field('author', 'Schiller');
+$vc->joint_field('author', 'Fontane');
+
+
+my $json = decode_json $vc->to_koral->to_string;
+
+is($json->{collection}->{operation}, 'operation:and');
+is($json->{collection}->{operands}->[0]->{'@type'}, 'koral:doc');
+is($json->{collection}->{operands}->[0]->{'value'}->[0], 'Goethe');
+is($json->{collection}->{operands}->[0]->{'value'}->[1], 'Schiller');
+
+done_testing;