@Test
public void shouldFailReceiveForUnknownActiveWFInstance() throws Exception {

  when(transaction.readActiveState(INSTANCE)).thenReturn(Optional.empty());
  try {
    stateManager.receive(Event.terminate(INSTANCE, Optional.empty()));
    fail();
  } catch (IllegalArgumentException ignore) {
  }
  verify(transaction, never()).updateActiveState(any(), any());
}