@@ -0,0 +1,1395 @@
+/*%0A * To change this license header, choose License Headers in Project Properties.%0A * To change this template file, choose Tools %7C Templates%0A * and open the template in the editor.%0A */%0Apackage org.restheart.examples.applogic;%0A%0Aimport java.util.Arrays;%0Aimport java.util.List;%0Aimport org.bson.Document;%0Aimport org.junit.After;%0Aimport org.junit.AfterClass;%0Aimport org.junit.Assert;%0Aimport org.junit.Before;%0Aimport org.junit.BeforeClass;%0Aimport org.junit.Test;%0A%0A/**%0A *%0A * @author mturatti%0A */%0Apublic class ExampleAggregateHandlerTest %7B%0A%0A    public ExampleAggregateHandlerTest() %7B%0A    %7D%0A%0A    @BeforeClass%0A    public static void setUpClass() %7B%0A    %7D%0A%0A    @AfterClass%0A    public static void tearDownClass() %7B%0A    %7D%0A%0A    @Before%0A    public void setUp() %7B%0A    %7D%0A%0A    @After%0A    public void tearDown() %7B%0A    %7D%0A%0A    @Test%0A    public void testAggreagationString() throws Exception %7B%0A        List%3CDocument%3E query = Arrays.asList(%0A                new Document(%22$unwind%22, %22$albums%22),%0A                new Document(%22$group%22, new Document(%22_id%22, %22$_id%22)%0A                        .append(%22count%22, new Document(%22$sum%22, 1))),%0A                new Document(%22$project%22, new Document(%22albums%22, %22$count%22))%0A        );%0A%0A        Assert.assertEquals(%22%5BDocument%7B%7B$unwind=$albums%7D%7D, Document%7B%7B$group=Document%7B%7B_id=$_id, count=Document%7B%7B$sum=1%7D%7D%7D%7D%7D%7D, Document%7B%7B$project=Document%7B%7Balbums=$count%7D%7D%7D%7D%5D%22, query.toString());%0A    %7D%0A%0A%7D%0A

Add a basic test