tests for N:M and notIn