### Question:
SwapperSet { synchronized int allocate( PageSwapper swapper ) { SwapperMapping[] swapperMappings = this.swapperMappings; synchronized ( free ) { if ( !free.isEmpty() ) { int id = free.intIterator().next(); free.remove( id ); swapperMappings[id] = new SwapperMapping( id, swapper ); this.swapperMappings = swapperMappings; return id; } } int id = swapperMappings.length; if ( id + 1 > MAX_SWAPPER_ID ) { throw new IllegalStateException( "All swapper ids are allocated: " + MAX_SWAPPER_ID ); } swapperMappings = Arrays.copyOf( swapperMappings, id + 1 ); swapperMappings[id] = new SwapperMapping( id, swapper ); this.swapperMappings = swapperMappings; return id; }    }### Answer:
@Test void mustNotUseZeroAsSwapperId() { PageSwapper swapper = new DummyPageSwapper( "a", 42 ); Matcher<Integer> isNotZero = is( not( 0 ) ); for ( int i = 0; i < 10_000; i++ ) { assertThat( set.allocate( swapper ), isNotZero ); } }