### Question:
PrimitiveArrays { static long countUnique( long[] left, long[] right ) { int l = 0; int r = 0; int uniqueInLeft = 0; int uniqueInRight = 0; while ( l < left.length && r < right.length ) { if ( left[l] == right[r] ) { l++; r++; } else if ( left[l] < right[r] ) { uniqueInLeft++; l++; } else { uniqueInRight++; r++; } } uniqueInLeft += left.length - l; uniqueInRight += right.length - r; return intPair( uniqueInLeft, uniqueInRight ); } private  PrimitiveArrays(); static int[] union( int[] lhs, int[] rhs ); static long[] intersect( long[] left, long[] right ); static long[] symmetricDifference( long[] left, long[] right ); static long[] of( PrimitiveLongCollection collection );  }### Answer:
@Test void shouldCountUnique() { assertThat( PrimitiveArrays.countUnique( new long[]{1, 2, 3}, new long[]{4, 5, 6} ), isIntPair( 3, 3 ) ); assertThat( PrimitiveArrays.countUnique( new long[]{1, 2, 3}, new long[]{3, 6} ), isIntPair( 2, 1 ) ); assertThat( PrimitiveArrays.countUnique( new long[]{1, 2, 3}, new long[]{3} ), isIntPair( 2, 0 ) ); assertThat( PrimitiveArrays.countUnique( new long[]{3}, new long[]{1, 2, 3} ), isIntPair( 0, 2 ) ); assertThat( PrimitiveArrays.countUnique( new long[]{3}, new long[]{3} ), isIntPair( 0, 0 ) ); assertThat( PrimitiveArrays.countUnique( new long[]{3, 6, 8}, new long[]{} ), isIntPair( 3, 0 ) ); assertThat( PrimitiveArrays.countUnique( new long[]{}, new long[]{3, 6, 8} ), isIntPair( 0, 3 ) ); assertThat( PrimitiveArrays.countUnique( new long[]{}, new long[]{} ), isIntPair( 0, 0 ) ); assertThat( PrimitiveArrays.countUnique( new long[]{4, 6, 9, 11, 12, 15}, new long[]{2, 3, 4, 7, 8, 9, 12, 16, 19} ), isIntPair( 3, 6 ) ); }