assertThat(counterFor(OnNewStatePlugin.class), is(1));
}
@Test
public void invariantViolatedIsCalled() throws Exception {
Invariant invariant = mock(Invariant.class);
plugins.runOnInvariantViolationPlugins(invariant, context);
verify(invariantViolationPlugin).onInvariantViolation(invariant, context);
assertThat(counterFor(OnInvariantViolationPlugin.class), is(1));
}