@Test
public void testReset() throws Exception {

    StereoEncoder a = mock(StereoEncoder.class);
    StereoEncoder b = mock(StereoEncoder.class);
    StereoEncoder encoder = new MultiStereoEncoder(Arrays.asList(a, b));
    long[] current = new long[0];
    long[] next = new long[0];
    when(a.encode(current, next)).thenReturn(true);
    when(b.encode(current, next)).thenReturn(true);
    // configured once
    assertTrue(encoder.encode(current, next));
    // not configured again
    assertFalse(encoder.encode(current, next));
    verify(a, times(1)).encode(current, next);
    verify(b, times(1)).encode(current, next);
    encoder.reset();
    assertTrue(encoder.encode(current, next));
    verify(a, times(2)).encode(current, next);
    verify(b, times(2)).encode(current, next);
}