Code example for AtomicInteger

Methods: get

0
    } 
  } 
 
  @Test 
  public void testAndHavingSpecShouldSupportShortcutEvaluation () { 
    AtomicInteger counter = new AtomicInteger(0);
    AndHavingSpec spec = new AndHavingSpec(ImmutableList.of(
      (HavingSpec)new CountingHavingSpec(counter, true),
      new CountingHavingSpec(counter, false),
      new CountingHavingSpec(counter, true),
      new CountingHavingSpec(counter, false)
    )); 
 
    spec.eval(ROW);
 
    assertEquals(2, counter.get());
  } 
 
  @Test 
  public void testAndHavingSpec () { 
    AtomicInteger counter = new AtomicInteger(0);