use strict;
use warnings;
use Test::More tests=>6;
use Mojo::JSON qw(decode_json encode_json to_json);
use REST::Client;
use Data::Dump qw(dump);

my $pid = fork();
my $res;
unless ($pid) {
    unless (fork) {
        exec "MOJO_CONFIG=../example.conf morbo script/derekovecs-server";
        die "exec failed!";
    }
    exit(0);
}
sleep(20);

my $client = REST::Client->new();
$client->GET('http://localhost:3000/?word=Grund&json=1');
$res = decode_json($client->responseContent());
is( $res->{list}->[0]->[1]->{word}, "Reaktion",  "primary paradigmatic neighbour of Grund" );
is( $res->{collocators}->[0]->{word},  "Hitchcock", "primary syntagmatic neighbour of Grund" );

$client->GET('http://localhost:3000/getClassicCollocators?w=Grund');
#print STDERR dump($res);
$res = decode_json($client->responseContent());
is( $res->{collocates}->[0]->{word}, "diesem", "primary collocate of Grund" );

$client->GET('http://localhost:3000/getClassicCollocators?w=Grund');
$res = decode_json($client->responseContent());
is( $res->{collocates}->[0]->{word}, "diesem", "primary collocate of Grund (cached)" );

$client->GET('http://localhost:3000/getCollocationAssociation?w=Grund&c=diesem');
$res = decode_json($client->responseContent());
is($res->{f1}, 29, "collocation association");

$client->GET('http://localhost:3000/getVersion');
$res = $client->responseContent();
like($res, qr/\d+\.?\d*\.?\d*/, "version ok");

for (my $i=0; $i<4; $i++) {
    $pid++;
    print STDERR "killing PID $pid\n";
    system("kill -9 $pid");
}
done_testing;
