// Path: src-test/assertions/A.java
// public class A<T>
// {
//     private T expected;
// 
//     public A(T expected)
//     {
//         this.expected = expected;
//     }
// 
//     public void act(T actual)
//     {
//         compare(expected,actual,"");
//     }
// 
//     public void act(T actual,String message)
//     {
//         compare(expected,actual,message);
//     }
// 
//     private void compare(T exp,T act,String message)
//     {
//         if (exp instanceof Collection)
//         {
//             Collection expCollection = (Collection) exp;
//             Collection actCollection = (Collection) act;
//             compareCollection(expCollection,actCollection,message);
//         }
//         else
//         {
//             Assert.assertEquals(message,exp,act);
//         }
//     }
// 
//     private <U extends Collection> void compareCollection(U exp,U act,String message)
//     {
//         Assert.assertEquals(message + " -> Collection sizes does not match",exp.size(),act.size());
// 
//         for (Object e : exp)
//         {
//             boolean found = false;
//             for (Object a : act)
//             {
//                 if (e.equals(a))
//                 {
//                     found = true;
//                     break;
//                 }
//             }
//             if (!found)
//                 Assert.fail(String.format(message + " -> expected object %s does not exists in actual object list",e));
//         }
//     }
// 
//     public static <T> A<T> exp(T t)
//     {
//         return new A<>(t);
//     }
// }
// 
// Path: src/joquery/core/QueryException.java
// public class QueryException extends Exception
// {
//     public QueryException(String message)
//     {
//         super(message);
//     }
// 
//     public QueryException(String message, Throwable cause)
//     {
//         super(message, cause);
//     }
// }


import assertions.A;
import joquery.core.QueryException;
import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.Test;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
        rightList.add(new RightDto(4, 103));

        //left only items
        leftList.add(new LeftDto(5, "5"));
        leftList.add(new LeftDto(6, "6"));
        leftList.add(new LeftDto(7, "7"));

        //right only items
        rightList.add(new RightDto(8, 104));
        rightList.add(new RightDto(9, 105));
        rightList.add(new RightDto(10, 106));
    }

    @AfterClass
    public static void cleanup()
    {
        leftList.clear();
        rightList.clear();
        leftList = null;
        rightList = null;
    }

    @Test
    public void join_TwoEmptyQueries_ShouldReturnEmpty() throws QueryException
    {
        SelectionQuery<LeftDto, LeftDto> leftQuery = CQ.query(Collections.<LeftDto>emptyList());
        SelectionQuery<RightDto, RightDto> rightQuery = CQ.query(Collections.<RightDto>emptyList());
        JoinQuery<LeftDto, RightDto, JoinedDto> joinQuery = leftQuery.innerJoin(rightQuery);

        Collection<JoinedDto> results = joinQuery.list();
// Path: src-test/assertions/A.java
// public class A<T>
// {
//     private T expected;
// 
//     public A(T expected)
//     {
//         this.expected = expected;
//     }
// 
//     public void act(T actual)
//     {
//         compare(expected,actual,"");
//     }
// 
//     public void act(T actual,String message)
//     {
//         compare(expected,actual,message);
//     }
// 
//     private void compare(T exp,T act,String message)
//     {
//         if (exp instanceof Collection)
//         {
//             Collection expCollection = (Collection) exp;
//             Collection actCollection = (Collection) act;
//             compareCollection(expCollection,actCollection,message);
//         }
//         else
//         {
//             Assert.assertEquals(message,exp,act);
//         }
//     }
// 
//     private <U extends Collection> void compareCollection(U exp,U act,String message)
//     {
//         Assert.assertEquals(message + " -> Collection sizes does not match",exp.size(),act.size());
// 
//         for (Object e : exp)
//         {
//             boolean found = false;
//             for (Object a : act)
//             {
//                 if (e.equals(a))
//                 {
//                     found = true;
//                     break;
//                 }
//             }
//             if (!found)
//                 Assert.fail(String.format(message + " -> expected object %s does not exists in actual object list",e));
//         }
//     }
// 
//     public static <T> A<T> exp(T t)
//     {
//         return new A<>(t);
//     }
// }
// 
// Path: src/joquery/core/QueryException.java
// public class QueryException extends Exception
// {
//     public QueryException(String message)
//     {
//         super(message);
//     }
// 
//     public QueryException(String message, Throwable cause)
//     {
//         super(message, cause);
//     }
// }


// Path: src-test/joquery/JoinTest.java
import assertions.A;
import joquery.core.QueryException;
import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.Test;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;

        rightList.add(new RightDto(4, 103));

        //left only items
        leftList.add(new LeftDto(5, "5"));
        leftList.add(new LeftDto(6, "6"));
        leftList.add(new LeftDto(7, "7"));

        //right only items
        rightList.add(new RightDto(8, 104));
        rightList.add(new RightDto(9, 105));
        rightList.add(new RightDto(10, 106));
    }

    @AfterClass
    public static void cleanup()
    {
        leftList.clear();
        rightList.clear();
        leftList = null;
        rightList = null;
    }

    @Test
    public void join_TwoEmptyQueries_ShouldReturnEmpty() throws QueryException
    {
        SelectionQuery<LeftDto, LeftDto> leftQuery = CQ.query(Collections.<LeftDto>emptyList());
        SelectionQuery<RightDto, RightDto> rightQuery = CQ.query(Collections.<RightDto>emptyList());
        JoinQuery<LeftDto, RightDto, JoinedDto> joinQuery = leftQuery.innerJoin(rightQuery);

        Collection<JoinedDto> results = joinQuery.list();
        A.exp(0).act(results.size());