Add JoinQuery test