Warn and fail on wrong token order

Change-Id: I573d974c8c27f1af9a450ffab0d6f6e61e358376
diff --git a/t/tokens_artificial.t b/t/tokens_artificial.t
new file mode 100644
index 0000000..8daec81
--- /dev/null
+++ b/t/tokens_artificial.t
@@ -0,0 +1,37 @@
+use strict;
+use warnings;
+use utf8;
+use Test::More;
+use Benchmark ':hireswallclock';
+use Mojo::DOM;
+use Mojo::File;
+use Mojo::ByteStream 'b';
+use Data::Dumper;
+use File::Basename 'dirname';
+use File::Spec::Functions 'catdir';
+use lib 'lib', '../lib';
+
+use_ok('KorAP::XML::Krill');
+
+# ART
+my $path = catdir(dirname(__FILE__), 'corpus','artificial');
+ok(my $doc = KorAP::XML::Krill->new( path => $path . '/' ), 'Load Korap::Document');
+
+ok($doc->parse, 'Parse document');
+
+$doc->parse;
+
+my $tokens = KorAP::XML::Tokenizer->new(
+  path => $doc->path,
+  doc => $doc,
+  foundry => 'OpenNLP',
+  layer => 'tokens_wrong',
+  name => 'Tokens'
+);
+
+# Order is wrong!
+ok(!$tokens->parse, 'Parse tokens');
+
+done_testing;
+__END__
+