PriorityPicker extends LinearLayout { public Observable<Priority> priority() { return mPriority.asObservable(); } PriorityPicker(Context context);  PriorityPicker(Context context, AttributeSet attrs);  PriorityPicker(Context context, AttributeSet attrs, int defStyleAttr); void setPriority(Priority priority); Observable<Priority> priority();  }
@Test public void testDefaultPriority() throws Exception { mPriorityPicker.priority().subscribe(mTestSubscriber); mTestSubscriber.assertValues(Priority.HIGH); }
@Test public void testClickPriorityLow() throws Exception { mPriorityPicker.priority().subscribe(mTestSubscriber); mLowPriorityView.performClick(); mTestSubscriber.assertValues(Priority.HIGH, Priority.LOW); }
@Test public void testClickPriorityMed() throws Exception { mPriorityPicker.priority().subscribe(mTestSubscriber); mMediumPriorityView.performClick(); mTestSubscriber.assertValues(Priority.HIGH, Priority.MED); }
@Test public void testClickPriorityHigh() throws Exception { mPriorityPicker.priority().subscribe(mTestSubscriber); mHighPriorityView.performClick(); mTestSubscriber.assertValues(Priority.HIGH, Priority.HIGH); }