### Question:
LevelState extends State { void setDrawable(@NonNull StateDraweeView view, int level) { FrescoImageController.create() .load(getDrawable(level)) .into(view); } LevelState(int defaultLevel, @DrawableRes int defaultRes); @Override void attach(@NonNull final StateDraweeView view); @Override void detach(@NonNull final StateDraweeView view); @Override String toString();  }### Answer:
@Test public void test_SetDrawable() { StateDraweeView view = Mockito.spy(new StateDraweeView(RuntimeEnvironment.application)); LevelState state = new LevelState(0, R.drawable.ui_ic_clear); state.setDrawable(view, 0); Mockito.verify(view).setController(Mockito.any(DraweeController.class)); }