Code example for ArrayBlockingQueue

0
	} 
 
	private class TestFooObserver extends FooObserver { 
 
		public final BlockingQueue<String> queue = new ArrayBlockingQueue<String>(
				10); 
 
		@Override 
		public void onBar(int current) {
			assertSame(Looper.getMainLooper().getThread(),
					Thread.currentThread());
 
			queue.add("bar:" + current);
		} 
 
		@Override 
		public void onBaz() { 
			assertSame(Looper.getMainLooper().getThread(),
					Thread.currentThread());
 
			queue.add("baz");