@Test(expected = IllegalStateException.class)
public void exists_onInconsistentIndex_throwsException() throws Exception {

    JdbcIndex<?> index = new JdbcIndex<>();
    when(headTableEngine.exists(index)).thenReturn(true);
    when(historyTableEngine.exists(index)).thenReturn(false);
    mapper.exists(index);
}