### Question:
FocusState extends BinaryState { void setDrawable(@NonNull StateDraweeView view) { FrescoImageController.create() .load(getDrawable(view.isFocused() ? STATE_ON : STATE_OFF)) .into(view); }  @Override void attach(@NonNull final StateDraweeView view); @Override void detach(@NonNull final StateDraweeView view);  }### Answer:
@Test public void test_SetDrawable() { StateDraweeView view = Mockito.spy(new StateDraweeView(RuntimeEnvironment.application)); FocusState state = new FocusState(); state.add(BinaryState.STATE_OFF, R.drawable.ui_ic_clear); state.add(BinaryState.STATE_ON, R.drawable.ui_ic_clear); state.setDrawable(view); Mockito.verify(view).setController(Mockito.any(DraweeController.class)); }