public void test(){
			assert state == State.OK;
			
			// get the internal thread number
			int i =  getInternalThreadId();
			
			// activate
			setState(i, State.GUARD);
			try{Thread.sleep(1+i);}catch(Throwable ignore){};
			
			// guard
			if( getState(i+1) != State.IDLE ){ setState(i, State.WAIT); }
			else{ setState(i, State.ACTIVE); }
			System.out.println("THREAD-" + i + ":\tstate " + getState(i) );
			try{Thread.sleep(1+i);}catch(Throwable ignore){};
			
			// assert: one thread must not be ACTIVE
			if( state0 == State.ACTIVE && state1 == State.ACTIVE ){
				state = State.ERROR;
			}
			assert state0 != State.ACTIVE || state1 != State.ACTIVE;
			
			// deactivate
			setState(i, State.IDLE);
			try{Thread.sleep(1+i);}catch(Throwable ignore){};
		}