FlowerDrawer implements RainbowImage.LoadPictureListener { @Override public void onLoadFail() { flowerImages.add(NO_IMAGE); } FlowerDrawer(Flower flower, List<RainbowImage> flowerImages, RainbowDrawer rainbowDrawer); static FlowerDrawer newInstance(Flower flower, RainbowDrawer rainbowDrawer); void init(); @Override void onLoadSucceed(RainbowImage imageLoaded); @Override void onLoadFail(); void paintFlowerFor(Branch branch);  }
@Test public void testThatOnLoadFailIncludesNullRainbowImageOnFlowerList() { flowerDrawer.onLoadFail(); Assertions.assertThat(loadedImages).containsExactly(NO_IMAGE); }