QueryImpl query = new QueryImpl( new MaxWidthCondition( px( 100 ) ) );
QueryImpl query2 = new QueryImpl( new MinWidthCondition( px( 101 ) ) );
notifier.addQueryListener( query, listener );
notifier.addQueryListener( query2, listener2 );
notifier.notifyListeners( createEnvironment( new Bounds( 0, 0, 99, 0 ) ) );
notifier.notifyListeners( createEnvironment( new Bounds( 0, 0, 199, 0 ) ) );
notifier.notifyListeners( createEnvironment( new Bounds( 0, 0, 99, 0 ) ) );
InOrder order = inOrder( listener, listener2 );
order.verify( listener ).activated( query );
order.verify( listener ).deactivated( query );
order.verify( listener2 ).activated( query2 );