@Test
public void testEncode_Anticlockwise_Alt() throws Exception {

    PermutationParity permutation = mock(PermutationParity.class);
    GeometricParity geometric = mock(GeometricParity.class);
    when(permutation.parity(any(long[].class))).thenReturn(-1);
    when(geometric.parity()).thenReturn(-1);
    StereoEncoder encoder = new GeometryEncoder(new int[]{1}, permutation, geometric);
    long[] prev = new long[3];
    long[] result = new long[3];
    Arrays.fill(prev, 1);
    Arrays.fill(result, 1);
    // check returned true
    assertTrue(encoder.encode(prev, result));
    // check only the value at index '1' was changed
    assertThat(result, is(new long[]{1, 15521419, 1}));
}